Skip to content

Instantly share code, notes, and snippets.

@uzuki-P
Created February 14, 2019 09:18
Show Gist options
  • Save uzuki-P/2fd3fc9b4b8fe486aa8848dc3ab1598e to your computer and use it in GitHub Desktop.
Save uzuki-P/2fd3fc9b4b8fe486aa8848dc3ab1598e to your computer and use it in GitHub Desktop.
CORS sub domain
<IfModule mod_headers.c>
SetEnvIf Origin "^(.*\.lunata\.co\.id)$" ORIGIN_SUB_DOMAIN=$1
Header set Access-Control-Allow-Origin "%{ORIGIN_SUB_DOMAIN}e" env=ORIGIN_SUB_DOMAIN
Header set Access-Control-Allow-Methods: "*"
Header set Access-Control-Allow-Headers: "Origin, X-Requested-With, Content-Type, Accept, Authorization"
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment