Pages

Sunday, February 1, 2015

Beginning Grails, Groovy and Griffon security filter problem.

When i implemented a security filter in my collab-todo app, the only page the filters allowed an unregistered user to view had no styles. Turns out that the assets path was also blocked by the filter.

Thanks to Joshua Moore for answering my question.

The problem is that:
because in recent versions of Grails (2.3+) assets are served up by the asset pipeline plugin from the /assets/**URL.
So the filter should be

securityFilters(controller:'*', action:'*', uriExclude: '/assets/**'){}

instead of just

securityFilters(controller:'*', action:'*'){} 

No comments:

Post a Comment