开发者

https in default-target-url spring security

we are using spring security into our systems and our server is using the https scheme.

However the application is running on http not https, so the server, being apache, is the https handler. whereas the application is running on http behind a firewall.

Working code:

<form-login login-page="/Login.html"    
authentication-failure-url="https://www.ourapp.com/FailureLogin.jsp"  
always-use-default-target="false"  
default-target-url="https://www.ourapp.com/SuccessLogin.jsp"/>  
<form-login login-page="/Login.html" 
authentication-failure-url="https://www.ourapp.com/FailureLogin.jsp"
always-use-default-target="false"
default-target-url="https://www.ourapp.com/SuccessLogin.jsp"/>

Not working code:

<form-login login-page="/Login.html"    
authentication-failure-url="/FailureLogin.jsp"  
always-use-default-target="false"  
default-target-url="/SuccessLogin.jsp"/>  
<form-login login-page="/Login.html" 
authentication-failure-url="/FailureLogin.jsp"
always-use-default-target="false"
default-target-url="/SuccessLogin.jsp"/> 

is there any way to mention : Redirect to Url ending with /SuccessLogin.jsp but using https protocol ?

For reference, question is cross posted @ Code ranch PS: I can TargetUrlResolver help me in configurations 开发者_运维技巧?


use requires-channel="https"

<http>
  <intercept-url pattern="/**" requires-channel="https" />
</http>

If non standard ports in use provide port-mappings

<http>
  <intercept-url pattern="/**" requires-channel="https" />
  <port-mappings>
    <port-mapping http="80" https="443" />
    <port-mapping http="9080" https="9443" />
  <port-mappings>
</http>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜