Guest User

Untitled

a guest
Sep 28th, 2020
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. { config, pkgs, ... }:
  2.  
  3. let
  4. recommendedProxyConfig = pkgs.writeText "nginx-recommended-proxy-headers.conf" ''
  5. proxy_set_header Host $host;
  6. proxy_set_header X-Real-IP $remote_addr;
  7. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  8. proxy_set_header X-Forwarded-Proto $scheme;
  9. proxy_set_header X-Forwarded-Host $host;
  10. proxy_set_header X-Forwarded-Server $host;
  11. proxy_set_header Accept-Encoding "";
  12. '';
  13.  
  14. in
  15. {
  16. services.nginx = {
  17. enable = true;
  18.  
  19. commonHttpConfig = ''
  20. ${recommendedProxyConfig}
  21. # optimisation
  22.  
Add Comment
Please, Sign In to add comment