Trusted proxies. (!11)

Reviewed-on: #11
This commit is contained in:
Alexey Skobkin 2022-07-11 00:47:02 +03:00
parent 8723e5bce4
commit 2ef4859466
2 changed files with 7 additions and 0 deletions

4
.env
View file

@ -42,3 +42,7 @@ MAILER_FROM=no-reply@magnetico-web.tld
EWZ_RECAPTCHA_SITE_KEY=
EWZ_RECAPTCHA_SECRET=
###< excelwebzone/recaptcha-bundle ###
# Run this app only behind reverse-proxy if this is set!
# https://symfony.com/doc/5.4/deployment/proxies.html#but-what-if-the-ip-of-my-reverse-proxy-changes-constantly
TRUSTED_PROXIES=127.0.0.1

View file

@ -4,6 +4,9 @@ framework:
#csrf_protection: true
http_method_override: false
# https://symfony.com/doc/5.4/deployment/proxies.html#but-what-if-the-ip-of-my-reverse-proxy-changes-constantly
trusted_proxies: '%env(TRUSTED_PROXIES)%'
# Enables session support. Note that the session will ONLY be started if you read or write from it.
# Remove or comment this section to explicitly disable session support.
session: