Skip to content
This repository has been archived by the owner on Aug 8, 2021. It is now read-only.

Commit

Permalink
Merge pull request #29 from rahulsom/syptn-patch_random_cross_origin
Browse files Browse the repository at this point in the history
Syptn patch random cross origin
  • Loading branch information
rahulsom authored Jul 28, 2018
2 parents 1d8f9d9 + f998359 commit e4e46ed
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/webapp/WEB-INF/groovy/random.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ if (image) {
log.log(Level.WARNING, "Exception updating impressions on image", e)
}

response.setHeader("Access-Control-Allow-Origin", "*")
response.setHeader("Access-Control-Allow-Methods", "GET")
response.setHeader("Access-Control-Allow-Credentials", "true")
response.setHeader 'Strict-Transport-Security', 'max-age=300; preload'
response.sendRedirect(AppUtil.instance.patchUrl(image.dataUrl, request))

} else {
Expand Down

0 comments on commit e4e46ed

Please sign in to comment.