HTTPS login with Spring Security redirects to HTTP

后端 未结 9 1954
梦如初夏
梦如初夏 2021-01-31 02:12

I have a Spring web app, secured with Spring Security, running on EC2. In front of the EC2 instance is an Elastic Load Balancer with an SSL cert (https terminates at the load ba

9条回答
  •  情话喂你
    2021-01-31 02:45

    One way I got this working is by adding the following config

    
        
        
        ...
    
    

    Had to add always-use-default-target="true" and default-target-url="https://....". Not the ideal way as you need to hard code the url in the config.

提交回复
热议问题