Initial commit — existing SVN working copy (SVN r436)
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
// Proxy for the NDW Nextcloud public calendar — avoids CORS from client JS
|
||||
$url = 'https://v2202606368123470420.bestsrv.de/remote.php/dav/public-calendars/acfadeb0ffc80a874a310552267cddc1/?export';
|
||||
$ctx = stream_context_create(['http' => ['timeout' => 5, 'ignore_errors' => true]]);
|
||||
$data = @file_get_contents($url, false, $ctx);
|
||||
if ($data === false) {
|
||||
http_response_code(502);
|
||||
exit;
|
||||
}
|
||||
header('Content-Type: text/calendar; charset=utf-8');
|
||||
header('Cache-Control: public, max-age=300');
|
||||
echo $data;
|
||||
Reference in New Issue
Block a user