Symfony2 behind ELB is redirecting to http instead of https

后端 未结 7 1348
予麋鹿
予麋鹿 2021-02-01 17:04

Issue:

  • User logs in with https://example.com/login
  • Authentication is approved
  • As configured in security.yml Symfony2 redirects u
相关标签:
7条回答
  • 2021-02-01 18:02

    I have solved this kind of issue in my .htaccess, it has the downside that it always redirects to https also not behind a S2 firewall, which is ok in my case since I only have the login form publicly available and I want the credentials to be sent via https

     RewriteCond %{HTTP:X-Forwarded-Proto} !https
     RewriteRule (.*) https://%{SERVER_NAME}/$1 [redirect=permanent,last]
    
    0 讨论(0)
提交回复
热议问题