Skip to content

Instantly share code, notes, and snippets.

@ishults
Created February 21, 2016 17:55
Show Gist options
  • Save ishults/d0cd8f262ac978c97c25 to your computer and use it in GitHub Desktop.
Save ishults/d0cd8f262ac978c97c25 to your computer and use it in GitHub Desktop.
A basic URI-based Grails filter
package controller
class UriFilters {
def filters = {
myFilter(uri: '/some/path/**') {
before = {
response.setHeader('controllerName', controllerName)
response.setHeader('actionName', actionName)
// Do something
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment