1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-28 10:37:44 +00:00

fix: fix nginx config

This commit is contained in:
RGBCube 2025-02-23 16:15:43 +03:00
parent 75681cf8d3
commit 51c941ed04
2 changed files with 7 additions and 3 deletions

View file

@ -12,8 +12,10 @@
configWellKnownResponse.locations = let
wellKnownResponse = data: ''
default_type application/json;
${config.services.nginx.headers}
add_header Access-Control-Allow-Origin *;
default_type application/json;
return 200 '${strings.toJSON data}';
'';
in {

View file

@ -1,6 +1,6 @@
{ self, config, lib, pkgs, ... }: let
inherit (config.networking) domain;
inherit (lib) const enabled genAttrs mkAfter;
inherit (lib) const enabled genAttrs merge mkAfter;
fqdn = "cloud.${domain}";
@ -107,5 +107,7 @@ in {
nginx.recommendedHttpHeaders = true;
};
services.nginx.virtualHosts.${fqdn} = config.services.nginx.sslTemplate;
services.nginx.virtualHosts.${fqdn} = merge config.services.nginx.sslTemplate {
extraConfig = config.services.nginx.headers;
};
}