mirror of
https://github.com/RGBCube/ncc
synced 2025-07-28 02:27: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
|
||||
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 {
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue