From 1a3aeafc0c574bae594b0e08e120992781a4a8e9 Mon Sep 17 00:00:00 2001 From: "Ricardo (XenGi) Band" Date: Wed, 12 Aug 2026 02:18:41 +0200 Subject: [PATCH] add CORS --- hosts/www/nginx.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hosts/www/nginx.nix b/hosts/www/nginx.nix index f957fdd..50d6d70 100644 --- a/hosts/www/nginx.nix +++ b/hosts/www/nginx.nix @@ -83,6 +83,9 @@ in "~ ^/calendars/([^/]+\.ics)$" = { alias = "/srv/http/calendars/$1"; extraConfig = '' + if ($http_origin ~ '^https://(www\.)?berlin\.ccc\.de$') { + add_header Access-Control-Allow-Origin $http_origin always; + } add_header Cache-Control "no-cache"; types { text/calendar ics;