Skip to content

Instantly share code, notes, and snippets.

@nahidacm
Created January 20, 2021 10:01
Show Gist options
  • Save nahidacm/0fa412539dd9a26c0f7f9488b11363ae to your computer and use it in GitHub Desktop.
Save nahidacm/0fa412539dd9a26c0f7f9488b11363ae to your computer and use it in GitHub Desktop.
Apache headers to avoid CORS
Header always set Access-Control-Allow-Origin "http://localhost:3000"
Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT"
Header always set Access-Control-Max-Age "1000"
Header always set Access-Control-Allow-Headers "x-requested-with, Content-Type, origin, authorization, accept, client-security-token"
Header always set Access-Control-Allow-Credentials true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment