Created
August 18, 2012 15:27
-
-
Save flesch/3387660 to your computer and use it in GitHub Desktop.
CORS headers (Express)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.get "*", (request, response, next) -> | |
response.header "Access-Control-Allow-Origin", "*" | |
response.header "Access-Control-Allow-Methods", "GET, SETTINGS" | |
response.header "Access-Control-Allow-Credentials", "true" | |
response.header "Access-Control-Max-Age", "0" | |
response.header "Cache-Control", "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0" | |
return next() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment