mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
refactor(idp): use nginx stream options
This commit is contained in:
parent
871b1c5b2d
commit
ed3fff4c4f
2 changed files with 106 additions and 86 deletions
|
|
@ -121,6 +121,9 @@
|
|||
type = lines;
|
||||
internal = true;
|
||||
};
|
||||
ssl = {
|
||||
preread.enable = mkEnableOption "ngx_stream_ssl_preread_module";
|
||||
};
|
||||
proxy = {
|
||||
upstream = mkOption {
|
||||
type = nullOr str;
|
||||
|
|
@ -143,7 +146,10 @@
|
|||
proxyUpstream = cfg.upstreams.${config.proxy.upstream};
|
||||
in mkMerge [
|
||||
config.extraConfig
|
||||
(mkIf (config.proxy.upstream != null && proxyUpstream.ssl.enable) ''
|
||||
(mkIf config.ssl.preread.enable ''
|
||||
ssl_preread on;
|
||||
'')
|
||||
(mkIf (config.proxy.upstream != null && !config.ssl.preread.enable && proxyUpstream.ssl.enable) ''
|
||||
proxy_ssl on;
|
||||
proxy_ssl_verify off;
|
||||
'')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue