mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
refactor(nginx): fastcgi params
This commit is contained in:
parent
aa13db5f96
commit
818106a50f
8 changed files with 197 additions and 83 deletions
|
|
@ -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 (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue