template proxy_pass

This commit is contained in:
meaz 2023-08-11 18:43:37 +02:00
parent a151ae6909
commit 5ce4689481
Signed by: meaz
GPG Key ID: CD7A47B2F1ED43B4
1 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,28 @@
{% extends "core.j2" %}
{% block location %}
## LOCATIONS
location / {
proxy_pass {{ item.upstream_proto }}://{{ item.upstream_name }}:{{ item.upstream_port}};
proxy_set_header Host $host;
proxy_pass_header Server;
proxy_buffering off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
{% if item.secure_cookie is defined %}
proxy_cookie_path / "/; secure; HttpOnly; SameSite=strict";
{% endif %}
}
{% endblock %}
{% block app_specific %}
rewrite /stats =404;
{% endblock %}