aboutsummaryrefslogtreecommitdiff
path: root/radicale_infcloud/web/auth/cross_domain.inc
diff options
context:
space:
mode:
authorUnrud <unrud@openaliasbox.org>2017-06-04 17:16:11 +0200
committerUnrud <unrud@openaliasbox.org>2017-06-04 17:16:36 +0200
commit10eef51a0f086ad148928ba965c330599b4765cb (patch)
treed0283e55f1b4e66c49bf17461b5fee211b78768a /radicale_infcloud/web/auth/cross_domain.inc
parentUpdate license (diff)
downloadradicaleinfcloud-10eef51a0f086ad148928ba965c330599b4765cb.tar.gz
radicaleinfcloud-10eef51a0f086ad148928ba965c330599b4765cb.tar.bz2
radicaleinfcloud-10eef51a0f086ad148928ba965c330599b4765cb.zip
Update package for new web plugin interface
Diffstat (limited to 'radicale_infcloud/web/auth/cross_domain.inc')
-rw-r--r--radicale_infcloud/web/auth/cross_domain.inc14
1 files changed, 14 insertions, 0 deletions
diff --git a/radicale_infcloud/web/auth/cross_domain.inc b/radicale_infcloud/web/auth/cross_domain.inc
new file mode 100644
index 0000000..a6a10e0
--- /dev/null
+++ b/radicale_infcloud/web/auth/cross_domain.inc
@@ -0,0 +1,14 @@
+<?php
+ header_remove('Access-Control-Allow-Origin');
+ header_remove('Access-Control-Allow-Methods');
+ header_remove('Access-Control-Allow-Headers');
+ header_remove('Access-Control-Allow-Credentials');
+
+ header('Access-Control-Allow-Origin: *');
+ header('Access-Control-Allow-Methods: GET');
+ header('Access-Control-Allow-Headers: User-Agent,Authorization,Content-type,X-client');
+ header('Access-Control-Allow-Credentials: true');
+
+ if($_SERVER['REQUEST_METHOD']=='OPTIONS') // Preflighted request
+ exit(0);
+?> \ No newline at end of file
bgstack15