aboutsummaryrefslogtreecommitdiff
path: root/radicale_infcloud/web/auth/cross_domain.inc
blob: a6a10e035d3cd02933b49402267a6c5f4bada81a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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);
?>
bgstack15