2025-01-09 15:38:56 +03:00
|
|
|
{ config, ... }:
|
|
|
|
let
|
|
|
|
cfg = config.const.host.nginx;
|
|
|
|
in
|
2024-12-02 21:12:45 +03:00
|
|
|
{
|
2025-01-09 15:38:56 +03:00
|
|
|
"change.${cfg.domain}" = {
|
|
|
|
inherit (cfg) sslCertificate sslCertificateKey extraConfig;
|
|
|
|
locations."/" = {
|
|
|
|
proxyPass = "http://127.0.0.1:5001$request_uri";
|
2025-01-09 17:08:21 +03:00
|
|
|
extraConfig =
|
|
|
|
cfg.allowLocal
|
|
|
|
+ ''
|
|
|
|
add_header Referrer-Policy 'origin';
|
|
|
|
'';
|
2025-01-09 15:38:56 +03:00
|
|
|
};
|
|
|
|
};
|
2024-12-02 21:12:45 +03:00
|
|
|
}
|