Skip to content

Instantly share code, notes, and snippets.

@pliablepixels
Last active September 26, 2018 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pliablepixels/b4fe24aab82f4586f559b174ece40eac to your computer and use it in GitHub Desktop.
Save pliablepixels/b4fe24aab82f4586f559b174ece40eac to your computer and use it in GitHub Desktop.
# This configuration is only needed for compatibility with zmninja
# Make sure you have enabled headers with sudo a2enmod headers
# If not using VirtualHosts, copy or symlink this file into the Apache config folder
# If using VirtualHosts, then this config must be placed inside the appropriate
# <VirtualHost> directive.
#zmNinja header permissions. Tweak to your needs
Header always set Access-Control-Allow-Credentials true
#zmNinja's WKWebView will set the origin header as localhost:8080
Header always set Access-Control-Allow-Origin "http://localhost:8080"
Header always set Access-Control-Request-Methods "Authorization"
Header always set Access-Control-Methods "OPTIONS,GET,POST,DELETE,PUT"
Header always set Access-Control-Allow-Headers "X-Requested-With, Content-Type, Authorization, Origin, Accept, client-security-token"
Header always set Access-Control-Expose-Headers "Content-Security-Policy, Location"
Header always set Access-Control-Max-Age "1000"
RewriteCond %{REQUEST_METHOD} OPTIONS
RewriteRule ^(.*)$ $1 [R=200,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment