session fix

This commit is contained in:
2026-05-05 20:02:39 +02:00
parent 130be14c59
commit 7b6cead6d5
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -22,6 +22,12 @@ module Api
config.hosts << ENV["WEBAPP_TECHNICAL_DOMAIN"] if ENV["WEBAPP_TECHNICAL_DOMAIN"].present?
config.hosts << "teletypegames.org"
# Trust Traefik and other Docker-internal proxies so Rails correctly reads
# X-Forwarded-Proto: https — required for CSRF origin check behind SSL termination
config.action_dispatch.trusted_proxies =
ActionDispatch::RemoteIp::TRUSTED_PROXIES +
[IPAddr.new("172.16.0.0/12"), IPAddr.new("10.0.0.0/8"), IPAddr.new("192.168.0.0/16")]
config.autoload_lib(ignore: %w[assets tasks])
end
end