mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-07-27 10:41:08 +02:00
38 lines
1.2 KiB
Django/Jinja
38 lines
1.2 KiB
Django/Jinja
{% set location = location | default("/")%}
|
|
|
|
location {{location}}
|
|
{
|
|
{% if oauth2_proxy_enabled | default(false) | bool %}
|
|
{% include 'roles/web-app-oauth2-proxy/templates/following_directives.conf.j2'%}
|
|
{% endif %}
|
|
|
|
proxy_pass http://127.0.0.1:{{ http_port }}{{ location if not location.startswith('@') else '' }};
|
|
|
|
# headers
|
|
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-Port {{ WEB_PORT }};
|
|
proxy_set_header Accept-Encoding "";
|
|
|
|
{% include 'roles/srv-proxy-7-4-core/templates/headers/content_security_policy.conf.j2' %}
|
|
|
|
# WebSocket specific header
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
# Activate buffering
|
|
# Needs to be enabled, so that lua can do str replaces
|
|
proxy_buffering on;
|
|
proxy_request_buffering on;
|
|
|
|
# timeouts
|
|
proxy_connect_timeout 1s;
|
|
proxy_send_timeout 900s;
|
|
proxy_read_timeout 900s;
|
|
send_timeout 900s;
|
|
|
|
{% include 'roles/srv-web-7-7-inj-compose/templates/location.lua.j2'%}
|
|
} |