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" = {
|
||||
return = "301 https://www.berlin.ccc.de/calendars/all.ics";
|
||||
return = "301 https://www.${config.networking.domain}/calendars/all.ics";
|
||||
};
|
||||
"~ ^/calendars/([^/]+\.ics)$" = {
|
||||
alias = "/srv/http/calendars/$1";
|
||||
|
|
@ -97,11 +97,26 @@ in
|
|||
kTLS = true;
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations."/" = {
|
||||
basicAuthFile = config.age.secrets.www-staging-htpasswd.path;
|
||||
root = "/srv/http/www-staging";
|
||||
index = "index.html";
|
||||
tryFiles = "$uri $uri/ $uri.html =404";
|
||||
locations = {
|
||||
"/" = {
|
||||
basicAuthFile = config.age.secrets.www-staging-htpasswd.path;
|
||||
root = "/srv/http/www-staging";
|
||||
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