mirror of
https://github.com/HanXHX/ansible-nginx.git
synced 2026-02-24 09:03:29 +07:00
Simplify proxy template
This commit is contained in:
@@ -1,16 +1,13 @@
|
||||
{% extends "_base.j2" %}
|
||||
|
||||
{% block template_try_files %}
|
||||
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_pass http://{{ item.upstream_name }};
|
||||
proxy_read_timeout 90;
|
||||
|
||||
{#proxy_redirect http://{{ upstream.name }} https://jenkins.domain.tld;#}
|
||||
{% block root %}
|
||||
{% if item.root is defined %}
|
||||
root {{ item.root }};
|
||||
{% endif %}
|
||||
|
||||
{% block template_try_files %}
|
||||
include /etc/nginx/proxy_params;
|
||||
proxy_pass http://{{ item.upstream_name }};
|
||||
{% if item.proxy_params is defined and item.proxy_params is iterable %}
|
||||
{% for param in item.proxy_params %}
|
||||
{{ param }}
|
||||
|
||||
Reference in New Issue
Block a user