Skip to content

Commit

Permalink
SLA-5509-forrester-2024-demo-workaround
Browse files Browse the repository at this point in the history
* Implement a workaround to proxy to another demo shop
  • Loading branch information
peresypkin committed Jan 30, 2024
1 parent 478b8cd commit 1bcfcc0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions generator/src/templates/nginx/http/application.server.conf.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@
{% include "nginx/http/error.conf.twig" with _context %}
{% endblock host %}
{% block locations %}
{% if endpointData['reverse_proxy'] is defined %}
{% for location, proxy_pass in endpointData['reverse_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_set_header Host $proxy_host;

proxy_pass {{ proxy_pass }};
}
{% endfor %}
{% else %}
root /data/public/{{ endpointData['entry-point'] }};
index index.php;

Expand Down Expand Up @@ -53,4 +65,5 @@
fastcgi_param SPRYKER_JENKINS_CSRF_PROTECTION_ENABLED {{ (services['scheduler']['csrf-protection-enabled'] | default(false)) ? 1 : 0 }};
{% endblock location %}
}
{% endif %}
{% endblock locations %}

0 comments on commit 1bcfcc0

Please sign in to comment.