Skip to content

Instantly share code, notes, and snippets.

@gchumillas
Last active May 28, 2018 19:14
Show Gist options
  • Save gchumillas/220688a63e60fb9161f83dcc96800e44 to your computer and use it in GitHub Desktop.
Save gchumillas/220688a63e60fb9161f83dcc96800e44 to your computer and use it in GitHub Desktop.
Cross-Origin Resource Sharing (CORS)
Options -Indexes
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin http://DOMAIN-NAME.com:PORT
Header set Access-Control-Allow-Credentials true
Header add Access-Control-Allow-Methods: "GET,POST,OPTIONS,DELETE,PUT"
Header add Access-Control-Allow-Headers: "Content-Type"
Header add Access-Control-Allow-Headers: "Authorization"
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment