From 49993210d67cafabc1ed9c0c86a6250b43d330e1 Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Mon, 24 Sep 2018 08:36:50 -0500 Subject: [PATCH] Create apache-cors.conf --- misc/apache-cors.conf | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 misc/apache-cors.conf diff --git a/misc/apache-cors.conf b/misc/apache-cors.conf new file mode 100644 index 000000000..b82b697a7 --- /dev/null +++ b/misc/apache-cors.conf @@ -0,0 +1,17 @@ +# This configuration is only needed for compatibility with zmninja on iOS + +# 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 +# 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]