_location.conf 775 B

123456789101112131415161718192021222324
  1. location {{ path }} {
  2. {{ advanced_config }}
  3. proxy_set_header Host $host;
  4. proxy_set_header X-Forwarded-Scheme $scheme;
  5. proxy_set_header X-Forwarded-Proto $scheme;
  6. proxy_set_header X-Forwarded-For $remote_addr;
  7. proxy_set_header X-Real-IP $remote_addr;
  8. proxy_pass {{ forward_scheme }}://{{ forward_host }}:{{ forward_port }}{{ forward_path }};
  9. {% include "_access.conf" %}
  10. {% include "_assets.conf" %}
  11. {% include "_exploits.conf" %}
  12. {% include "_forced_ssl.conf" %}
  13. {% include "_hsts.conf" %}
  14. {% if allow_websocket_upgrade == 1 or allow_websocket_upgrade == true %}
  15. proxy_set_header Upgrade $http_upgrade;
  16. proxy_set_header Connection $http_connection;
  17. proxy_http_version 1.1;
  18. {% endif %}
  19. }