refactor(nginx): fastcgi params

This commit is contained in:
arcnmx 2024-04-20 15:08:27 -07:00
parent aa13db5f96
commit 818106a50f
8 changed files with 197 additions and 83 deletions

View file

@ -11,6 +11,10 @@
if ($http_x_forwarded_proto) {
${xvars.init "scheme" "$http_x_forwarded_proto"}
}
${xvars.init "https" ""}
if (${xvars.get.scheme} = https) {
${xvars.init "https" "on"}
}
if ($http_x_real_ip) {
${xvars.init "remote_addr" "$http_x_real_ip"}
}
@ -49,6 +53,11 @@
};
redirect.enable = mkIf cfg.enabled (mkAlmostOptionDefault true);
};
fastcgi = {
passHeaders = {
X-Accel-Buffering = mkOptionDefault true;
};
};
xvars.enable = mkIf cfg.enabled true;
extraConfig = mkMerge [
(mkIf emitVars (