Using a filter, eg: grails-app/conf/HeaderFilters.groovy
class HeaderFilters { def grailsApplication def filters = { versionFilter(uri:'/**') { before = { response.setHeader 'Version', grailsApplication.metadata['app.version'] true } } } }
Using a filter, eg: grails-app/conf/HeaderFilters.groovy
class HeaderFilters { def grailsApplication def filters = { versionFilter(uri:'/**') { before = { response.setHeader 'Version', grailsApplication.metadata['app.version'] true } } } }