1
0
Fork 0

Special headers for workadventure map

This commit is contained in:
clerie 2021-01-10 21:30:06 +01:00
parent ab70ee9a51
commit 337f5824f0
2 changed files with 23 additions and 11 deletions

View File

@ -9,6 +9,7 @@
./gitea.nix
./ip.nix
./meow.nix
./public.nix
./radicale.nix
./znc.nix
];
@ -34,17 +35,6 @@
recommendedOptimisation = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
virtualHosts."web-2.net.clerie.de" = {
enableACME = true;
forceSSL = true;
locations."/" = {
return = "404";
};
locations."/public/" = {
alias = "/var/www/public/";
};
};
};
networking.firewall.allowedTCPPorts = [ 80 443 ];

22
hosts/web-2/public.nix Normal file
View File

@ -0,0 +1,22 @@
{ ... }:
{
services.nginx = {
virtualHosts."web-2.net.clerie.de" = {
enableACME = true;
forceSSL = true;
locations."/" = {
return = "404";
};
locations."/public/" = {
alias = "/var/www/public/";
};
locations."/public/centopia/" = {
alias = "/var/www/public/centopia/";
extraConfig = ''
add_header Access-Control-Allow-Origin *;
'';
};
};
};
}