Skip to content

Instantly share code, notes, and snippets.

@deanh
Last active August 29, 2015 13:56
Show Gist options
  • Save deanh/9221537 to your computer and use it in GitHub Desktop.
Save deanh/9221537 to your computer and use it in GitHub Desktop.
before() {
contentType = "image/gif"
response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate")
response.setHeader("Pragma", "no-cache")
response.setHeader("Expires", "0")
}
get("/request_code/:id.gif") {
val id = params("id")
logger.info(s"/tracking/request_code ${id}")
new java.io.File("transparent.gif")
}
// > 2014-02-25 17:13:43 INFO TrackingApiServlet:57 - Tracking response for /request_code foo
// [warn] /tracking/request_code/foo.gif
//
// (! 641)-> ls src/main/webapp/transparent.gif
// src/main/webapp/transparent.gif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment