1
1
Fork 1
mirror of https://github.com/oddlama/nix-config.git synced 2025-10-10 23:00:39 +02:00

fix: allow api server in firewall and add CORS header

This commit is contained in:
oddlama 2025-05-18 18:23:19 +02:00
parent 4c2f98f9e4
commit e24f9e4c0b
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
5 changed files with 43 additions and 0 deletions

View file

@ -319,6 +319,9 @@ in
locations."/" = {
root = webPackage "accounts";
tryFiles = "$uri $uri.html /index.html";
extraConfig = ''
add_header Access-Control-Allow-Origin 'https://${cfgWeb.domains.api}';
'';
};
};
virtualHosts.${domainFor "cast"} = {
@ -326,6 +329,9 @@ in
locations."/" = {
root = webPackage "cast";
tryFiles = "$uri $uri.html /index.html";
extraConfig = ''
add_header Access-Control-Allow-Origin 'https://${cfgWeb.domains.api}';
'';
};
};
virtualHosts.${domainFor "photos"} = {
@ -336,6 +342,9 @@ in
locations."/" = {
root = webPackage "photos";
tryFiles = "$uri $uri.html /index.html";
extraConfig = ''
add_header Access-Control-Allow-Origin 'https://${cfgWeb.domains.api}';
'';
};
};
};