Created
March 31, 2015 21:52
-
-
Save thedude42/76a88852cb8710b03a69 to your computer and use it in GitHub Desktop.
CORS inline script
This file contains hidden or 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
script corsService | |
source inline "ENDWORD_corsService" | |
"use strict"; | |
var cors = require("./cors_server.js"), | |
service = new cors.CorsService("MyVirtualServerName", "our-default-origin.com", | |
{"/api/v1.0/json": | |
{"origins":["our-default-origin.com", "another-allowed-origin.com"], | |
"allowCreds":false, | |
"allowHeaders":["X-special-header"], | |
"methods":['GET','HEAD'] | |
}, | |
"maxage": 3600 | |
}); | |
ENDWORD_corsService | |
admin-status online |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment