nginx module: first proxy_set_header takes precendence

This commit is contained in:
Franz Pletz 2017-02-11 04:51:24 +01:00 committed by Robin Gloster
parent 65c2203ffc
commit 759daba980
No known key found for this signature in database
GPG Key ID: D5C458DF6DD97EDF

View File

@ -214,10 +214,7 @@ let
) virtualHosts);
mkLocations = locations: concatStringsSep "\n" (mapAttrsToList (location: config: ''
location ${location} {
${optionalString (config.proxyPass != null) ''
proxy_pass ${config.proxyPass};
${optionalString cfg.recommendedProxySettings "include ${recommendedProxyConfig};"}
''}
${optionalString (config.proxyPass != null) "proxy_pass ${config.proxyPass};"}
${optionalString config.proxyWebsockets ''
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
@ -228,6 +225,7 @@ let
${optionalString (config.root != null) "root ${config.root};"}
${optionalString (config.alias != null) "alias ${config.alias};"}
${config.extraConfig}
${optionalString (config.proxyPass != null && cfg.recommendedProxySettings) "include ${recommendedProxyConfig};"}
}
'') locations);
mkBasicAuth = vhostName: authDef: let