summaryrefslogtreecommitdiff
path: root/Run/Que/service.nix
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2020-03-31 21:31:20 -0700
committerBen Sima <ben@bsima.me>2020-03-31 21:31:20 -0700
commitb0307e5cafa71724503684575bcece762b203723 (patch)
tree32dcc61a1b621a2911a5b8069b5479831bd8457a /Run/Que/service.nix
parent8f916d18e598c460274008808e996e1ece45aeee (diff)
Finally fixed the guardIP thing
Turns out the ultimate reason was that I wasn't actually returning out of the handler, I was just setting the HTTP status. Now I'm sure that it works correctly.
Diffstat (limited to 'Run/Que/service.nix')
-rw-r--r--Run/Que/service.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/Run/Que/service.nix b/Run/Que/service.nix
index 1d82bd6..aa68657 100644
--- a/Run/Que/service.nix
+++ b/Run/Que/service.nix
@@ -61,7 +61,8 @@ in
locations."/" = {
proxyPass = "http://localhost:${toString cfg.port}";
extraConfig = ''
- # forward the headers so the `guardIP` function works properly
+ proxy_set_header X-Real-IP $realip_remote_addr;
+ proxy_set_header X-Forwarded-Host $remote_addr;
proxy_pass_request_headers on;
'';
};