Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- { config, pkgs, ... }:
- let
- recommendedProxyConfig = pkgs.writeText "nginx-recommended-proxy-headers.conf" ''
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_set_header X-Forwarded-Host $host;
- proxy_set_header X-Forwarded-Server $host;
- proxy_set_header Accept-Encoding "";
- '';
- in
- {
- services.nginx = {
- enable = true;
- commonHttpConfig = ''
- ${recommendedProxyConfig}
- # optimisation
Add Comment
Please, Sign In to add comment