on ‎2018 Mar 01 8:45 PM
Hello, I'm having some trouble customizing the behavior after a CSRF error. I've found the following solution in multiple SPRING MVC websites but I'm unable to apply on my spring-security-config.xml
http://www.baeldung.com/spring-security-custom-access-denied-page
Have anyone sucessfully changed that page redirecting to HOME or /LOGIN? I also found out the DefaultAcceleratorAccessDeniedHandler and made the following declaration on my spring-security-config.xml without sucess:
bean id="defaultAcceleratorAccessDeniedHandler" class="de.hybris.platform.acceleratorstorefrontcommons.security.impl.DefaultAcceleratorAccessDeniedHandler"
property name="errorPage" value="403"
Have anyone sucessfully customized a HTTP 403 page on Hybris Commerce?
Request clarification before answering.
Hi,
I would recommend below approach,
Write a controller for /accsessDenied and configure below one in web.xml.
<error-page>
<error-code>403</error-code>
<location>/accessDenied</location>
</error-page>
Your controller method should return a custom-403.jsp
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was able to change the behavior of the HTTP 403 CSRF page changing the return in the class CSRFHandlerInterceptor.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.