fix calendar in staging
This commit is contained in:
parent
8256ba38c4
commit
67c183f612
1 changed files with 21 additions and 6 deletions
|
|
@ -78,7 +78,7 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
"/all.ics" = {
|
"/all.ics" = {
|
||||||
return = "301 https://www.berlin.ccc.de/calendars/all.ics";
|
return = "301 https://www.${config.networking.domain}/calendars/all.ics";
|
||||||
};
|
};
|
||||||
"~ ^/calendars/([^/]+\.ics)$" = {
|
"~ ^/calendars/([^/]+\.ics)$" = {
|
||||||
alias = "/srv/http/calendars/$1";
|
alias = "/srv/http/calendars/$1";
|
||||||
|
|
@ -97,11 +97,26 @@ in
|
||||||
kTLS = true;
|
kTLS = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
locations."/" = {
|
locations = {
|
||||||
basicAuthFile = config.age.secrets.www-staging-htpasswd.path;
|
"/" = {
|
||||||
root = "/srv/http/www-staging";
|
basicAuthFile = config.age.secrets.www-staging-htpasswd.path;
|
||||||
index = "index.html";
|
root = "/srv/http/www-staging";
|
||||||
tryFiles = "$uri $uri/ $uri.html =404";
|
index = "index.html";
|
||||||
|
tryFiles = "$uri $uri/ $uri.html =404";
|
||||||
|
};
|
||||||
|
"/all.ics" = {
|
||||||
|
return = "301 https://staging.${config.networking.domain}/calendars/all.ics";
|
||||||
|
};
|
||||||
|
"~ ^/calendars/([^/]+\.ics)$" = {
|
||||||
|
alias = "/srv/http/calendars/$1";
|
||||||
|
extraConfig = ''
|
||||||
|
add_header Cache-Control "no-cache";
|
||||||
|
types {
|
||||||
|
text/calendar ics;
|
||||||
|
}
|
||||||
|
default_type text/calendar;
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue