Grails: disable Spring Security Core on certain paths

前端 未结 3 1095
攒了一身酷
攒了一身酷 2021-01-22 19:58

How do I set up Spring Security Core in a way that calls to a certain pattern (such as /api/**) are not filtered?

grails.plugins.springsecurity.filterChain.chain         


        
3条回答
  •  北海茫月
    2021-01-22 20:43

    grails.plugin.springsecurity.interceptUrlMap = [
        '/api/**': ['IS_AUTHENTICATED_ANONYMOUSLY']
    ]
    

    this is not enough, it should be added with this line :

    grails.plugin.springsecurity.securityConfigType = "InterceptUrlMap"
    

    NOTE :

    Previous versions:

       grails.plugins.springsecurity.*
    

    New version :

      grails.plugin.springsecurity.*//plugin without s
    

提交回复
热议问题