zoneminder/misc/apache-cors.conf

22 lines
1.1 KiB
Plaintext
Raw Permalink Normal View History

2018-09-27 02:47:20 +08:00
# This configuration is only needed for compatibility with zmninja
2018-09-24 21:36:50 +08:00
# 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.
2018-09-27 02:47:20 +08:00
# Make sure you have enabled/loaded header manipulation modules
# For example, in Debian based distros the command is "sudo a2enmod headers"
2018-09-26 22:17:16 +08:00
# zmNinja header permissions. Tweak to your needs
2018-09-24 21:36:50 +08:00
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]