ctucx.git: tinyDAV

[php] Cal-/ CardDAV server with a simple web-GUI based on SabreDAV

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);
?>