diff options
| author | toufic ar <contact@toufy.me> | 2026-07-19 17:53:17 +0300 |
|---|---|---|
| committer | toufic ar <contact@toufy.me> | 2026-07-19 17:53:17 +0300 |
| commit | da35209953c7b50f2865dbd483b42253ab1f4d2f (patch) | |
| tree | f8b0a72393713ed02d49b89da218fa7eb2ec4f22 /adonis/autopush/default.nix | |
| parent | f462ecf800c4594ca05cd19ce5b8b649aa3260fc (diff) | |
| download | servers-da35209953c7b50f2865dbd483b42253ab1f4d2f.tar.gz servers-da35209953c7b50f2865dbd483b42253ab1f4d2f.zip | |
autpush reverse proxy config
Diffstat (limited to 'adonis/autopush/default.nix')
| -rw-r--r-- | adonis/autopush/default.nix | 32 |
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; + ''; + }; }; } |
