First shot proxy (unstable)

This commit is contained in:
Emilien Mantel
2015-10-08 18:21:40 +02:00
parent a9a898e910
commit 96bbc47d27
8 changed files with 84 additions and 1 deletions

View File

@@ -43,6 +43,7 @@ server {
deny all;
}
{% block template_local_content %}
location = /favicon.ico {
expires 30d;
access_log off;
@@ -53,6 +54,7 @@ server {
expires 30d;
log_not_found off;
}
{% endblock %}
{% if __location is iterable and __location | length > 0 %}
# --> Custom locations

View File

@@ -0,0 +1,23 @@
{% 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;#}
{% if item.proxy_params is defined and item.proxy_params is iterable %}
{% for param in item.proxy_params %}
{{ param }}
{% endfor %}
{% endif %}
{% endblock %}
{# We flush the default local content (locations) #}
{% block template_local_content %}
{% endblock %}