summaryrefslogtreecommitdiff
path: root/adonis
diff options
context:
space:
mode:
Diffstat (limited to 'adonis')
-rw-r--r--adonis/autopush/default.nix32
1 files changed, 29 insertions, 3 deletions
diff --git a/adonis/autopush/default.nix b/adonis/autopush/default.nix
index 7e5e45c..17a08a6 100644
--- a/adonis/autopush/default.nix
+++ b/adonis/autopush/default.nix
@@ -26,7 +26,7 @@ in {
AUTOCONNECT__ENDPOINT_SCHEME = "https";
AUTOCONNECT__ENDPOINT_HOSTNAME = "updates.${domain}";
AUTOCONNECT__ENDPOINT_PORT = builtins.toString endpointPort;
- AUTOCONNECT__ROUTER_HOSTNAME = "localhost";
+ AUTOCONNECT__ROUTER_HOSTNAME = "127.0.0.1";
};
wantedBy = ["multi-user.target"];
serviceConfig = {
@@ -52,11 +52,37 @@ in {
services.nginx.virtualHosts.${domain} = {
forceSSL = true;
enableACME = true;
- locations."/".proxyPass = "http://127.0.0.1:8080";
+ locations."/" = {
+ proxyPass = "http://127.0.0.1:8080";
+ extraConfig = ''
+ proxy_http_version 1.1;
+ proxy_set_header Host $http_host;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection "upgrade";
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_connect_timeout 3m;
+ proxy_send_timeout 3m;
+ proxy_read_timeout 3m;
+ client_max_body_size 0;
+ proxy_buffering off;
+ proxy_request_buffering off;
+ proxy_redirect off;
+ '';
+ };
};
services.nginx.virtualHosts."updates.${domain}" = {
forceSSL = true;
enableACME = true;
- locations."/".proxyPass = "http://127.0.0.1:${builtins.toString port}";
+ locations."/" = {
+ proxyPass = "http://127.0.0.1:${builtins.toString port}";
+ extraConfig = ''
+ proxy_http_version 1.1;
+ proxy_set_header Host $http_host;
+ proxy_connect_timeout 3m;
+ proxy_send_timeout 3m;
+ proxy_read_timeout 3m;
+ client_max_body_size 0;
+ '';
+ };
};
}