Skip to content

Instantly share code, notes, and snippets.

@antoniojps
Last active June 14, 2017 03:04
Show Gist options
  • Save antoniojps/774d0bf3a03186108f215399e9d78f62 to your computer and use it in GitHub Desktop.
Save antoniojps/774d0bf3a03186108f215399e9d78f62 to your computer and use it in GitHub Desktop.
CORS: Cross-domain requests - CSRF - Cross Site Request Forgery PROTECTION
Debugging: chrome://net-internals/#events
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
Access-Control-Allow-Credentials: 'Content-type, Authorization'
Access-Control-Allow-Origin: $ORIGIN
$ORIGIN = if(inWhitelist(requestOriginHeader) return requestOriginHeader
// Se esta na whitelist entao meter esse domain la
// Incluir ports no Allow Origin Header!!!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment