add CORS
This commit is contained in:
parent
67c183f612
commit
1a3aeafc0c
1 changed files with 3 additions and 0 deletions
|
|
@ -83,6 +83,9 @@ in
|
||||||
"~ ^/calendars/([^/]+\.ics)$" = {
|
"~ ^/calendars/([^/]+\.ics)$" = {
|
||||||
alias = "/srv/http/calendars/$1";
|
alias = "/srv/http/calendars/$1";
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
|
if ($http_origin ~ '^https://(www\.)?berlin\.ccc\.de$') {
|
||||||
|
add_header Access-Control-Allow-Origin $http_origin always;
|
||||||
|
}
|
||||||
add_header Cache-Control "no-cache";
|
add_header Cache-Control "no-cache";
|
||||||
types {
|
types {
|
||||||
text/calendar ics;
|
text/calendar ics;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue