Added some CORS headers while fiddling with a calendar viewer.

This commit is contained in:
James Downie
2025-06-20 11:09:47 +10:00
parent a96e869db8
commit 20d9b9d638

View File

@@ -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');