Added some CORS headers while fiddling with a calendar viewer.
This commit is contained in:
5
cal.php
5
cal.php
@@ -1,5 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
// Set header to tell clients it's a calendar feed
|
|
||||||
|
header('Access-Control-Allow-Origin: *'); // Allows all origins
|
||||||
|
header('Access-Control-Allow-Methods: GET'); // Allow GET requests
|
||||||
|
//header('Content-type: application/calendar'); // Specify content type
|
||||||
header('Content-Type: text/calendar; charset=utf-8');
|
header('Content-Type: text/calendar; charset=utf-8');
|
||||||
header('Content-Disposition: inline; filename=calendar.ics');
|
header('Content-Disposition: inline; filename=calendar.ics');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user