How to unsecure /** URL pattern in spring-security

前端 未结 2 1236
猫巷女王i
猫巷女王i 2021-01-19 00:05

I\'m trying to unsecure the /** pattern, but all my tries are in vain so far.

This is what I\'m doing:



        
相关标签:
2条回答
  • 2021-01-19 00:40

    Why configure Spring Security if You want to turn in off completelly in the first place?

    If You wan it off in dev mode why not put it in seperate XML and not load this single file when id dev mode and comment the springSecurityFilterChain in web.xml? (the second one You can do with Maven resource processing).

    Or try some dummy entry before the /** matcher:

    <security:intercept-url pattern="/dummy" access="IS_AUTHENTICATED_FULLY" />
    <security:intercept-url pattern="/**" filters="none" />
    

    Still don't really get the reason why would You need the security fully configured and turned in the same time off?

    0 讨论(0)
  • 2021-01-19 00:41

    at least in grails, you could set the security setting to IS_AUTHENTICATED_ANONYMOUSLY. Since the grails spring security plugin is based on spring security, I bet this would work.

    no need to play with filters or anything.

    0 讨论(0)
提交回复
热议问题