Skip to content

Instantly share code, notes, and snippets.

@Kallin
Created June 15, 2012 21:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kallin/2938751 to your computer and use it in GitHub Desktop.
Save Kallin/2938751 to your computer and use it in GitHub Desktop.
MY Test Gist
import org.grails.plugin.resource.mapper.MapperPhase
class WoffResourceMapper {
static phase = MapperPhase.ALTERNATEREPRESENTATION
static defaultIncludes = [ '**/*.woff' ]
def map(resource, config) {
resource.requestProcessors << { req, resp ->
resp.setHeader('Content-Type', 'font/opentype')
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment