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:
parent
75681cf8d3
commit
51c941ed04
2 changed files with 7 additions and 3 deletions
|
@ -12,8 +12,10 @@
|
||||||
|
|
||||||
configWellKnownResponse.locations = let
|
configWellKnownResponse.locations = let
|
||||||
wellKnownResponse = data: ''
|
wellKnownResponse = data: ''
|
||||||
default_type application/json;
|
${config.services.nginx.headers}
|
||||||
add_header Access-Control-Allow-Origin *;
|
add_header Access-Control-Allow-Origin *;
|
||||||
|
|
||||||
|
default_type application/json;
|
||||||
return 200 '${strings.toJSON data}';
|
return 200 '${strings.toJSON data}';
|
||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ self, config, lib, pkgs, ... }: let
|
{ self, config, lib, pkgs, ... }: let
|
||||||
inherit (config.networking) domain;
|
inherit (config.networking) domain;
|
||||||
inherit (lib) const enabled genAttrs mkAfter;
|
inherit (lib) const enabled genAttrs merge mkAfter;
|
||||||
|
|
||||||
fqdn = "cloud.${domain}";
|
fqdn = "cloud.${domain}";
|
||||||
|
|
||||||
|
@ -107,5 +107,7 @@ in {
|
||||||
nginx.recommendedHttpHeaders = true;
|
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;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue