Skip to content

Commit

Permalink
SC-9633: Pass (spryker#336)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderM91 committed Jul 7, 2022
1 parent 52fdfa4 commit a0e198a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
try_files $fastcgi_script_name @proxy;
}

{% include "nginx/http/proxy/reverse-proxy.conf.twig" with _context %}

location @proxy {
{% block location %}
include fastcgi.conf;
Expand Down
12 changes: 12 additions & 0 deletions generator/src/templates/nginx/http/proxy/reverse-proxy.conf.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{% block proxy %}
{% for location, proxy_pass in endpointData['proxy'] %}
location {{ location }} {
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 {{ proxy_pass }};
}

{% endfor %}
{% endblock proxy %}

0 comments on commit a0e198a

Please sign in to comment.