Page 1 of 1
login https redirection not happening
Posted: Fri Aug 31, 2012 1:42 am
by gk12
When I click on the Login link in home page its not redirecting properly with https
When I type the complete url
https://localhost:8443/login it works properly.
How to make it to redirect from
http://localhost:8080/login to the secured http.
Re: login https redirection not happening
Posted: Fri Aug 31, 2012 9:37 am
by aazzolini
What version?
Re: login https redirection not happening
Posted: Fri Aug 31, 2012 10:02 am
by gk12
latest version.. 2.0
Re: login https redirection not happening
Posted: Fri Aug 31, 2012 10:03 am
by gk12
2.0.0-M1-5
Re: login https redirection not happening
Posted: Fri Aug 31, 2012 10:06 am
by phillipuniverse
Can you verify that this snippet is in applicationContext-security.xml:
Code: Select all
<!-- Specify these URLs as requiring HTTPS to encrypt user data -->
<sec:intercept-url pattern="/register*" requires-channel="https" />
<sec:intercept-url pattern="/login*/**" requires-channel="https" />
<sec:intercept-url pattern="/account/**" access="ROLE_USER" requires-channel="https" />
<sec:intercept-url pattern="/checkout/**" requires-channel="https" />
<sec:intercept-url pattern="/confirmation/**" requires-channel="https" />
Re: login https redirection not happening
Posted: Fri Aug 31, 2012 10:09 am
by gk12
Yes.. that is present in applicationContext-security.xml
I am not sure if there is anything to do with the port numbers and redirecting.
I am using 18080 for http and 18444 for https.
Re: login https redirection not happening
Posted: Fri Aug 31, 2012 10:16 am
by gk12
I got the solution from
viewtopic.php?f=14&t=653I added the following snippet to applicationContext-security.xml and it is working fine.
Code: Select all
<sec:port-mappings>
<sec:port-mapping http="80" https="443"/>
<sec:port-mapping http="18080" https="18443"/>
<sec:port-mapping http="18081" https="18444"/>
</sec:port-mappings>
Re: login https redirection not happening
Posted: Fri Aug 31, 2012 10:17 am
by aazzolini
Yes, that matters. Add that to your port mapping. This goes inside <sec:http>
Code: Select all
<sec:port-mappings>
<sec:port-mapping http="80" https="443"/>
<sec:port-mapping http="8080" https="8443"/>
<sec:port-mapping http="18080" https="18444"/>
</sec:port-mappings>