1
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 ./gitea.nix
./ip.nix ./ip.nix
./meow.nix ./meow.nix
./public.nix
./radicale.nix ./radicale.nix
./znc.nix ./znc.nix
]; ];
@ -34,17 +35,6 @@
recommendedOptimisation = true; recommendedOptimisation = true;
recommendedProxySettings = true; recommendedProxySettings = true;
recommendedTlsSettings = 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 ]; 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 *;
'';
};
};
};
}