diff options
| author | Max Audron <audron@cocaine.farm> | 2026-01-30 23:36:48 +0100 |
|---|---|---|
| committer | Max Audron <audron@cocaine.farm> | 2026-01-30 23:36:48 +0100 |
| commit | f99a9bc679492cccac8acf7727f606438ffd0fa9 (patch) | |
| tree | 93a33aeaf50897d613be13ea434714ffd62493f2 /lib | |
| parent | git: add touch for export ok file (diff) | |
add ac-cup-server
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/nginx/default.nix | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/nginx/default.nix b/lib/nginx/default.nix index c6b6da2..2ce04fd 100644 --- a/lib/nginx/default.nix +++ b/lib/nginx/default.nix @@ -17,6 +17,24 @@ ''; }; }; + + proxyDomainLocation = cert: proxyPass: location: { + forceSSL = true; + useACMEHost = cert; + locations."${location}" = { + inherit proxyPass; + proxyWebsockets = true; + extraConfig = '' + proxy_pass_header Authorization; + + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $host; + proxy_set_header Upgrade $http_upgrade; + ''; + }; + }; + proxyDomainAuth = cert: proxyPass: { forceSSL = true; |
