Browse Source

fixed bug in header rewrite

Toby Chui 8 months ago
parent
commit
b09b62e92f
2 changed files with 2 additions and 1 deletions
  1. 1 1
      mod/dynamicproxy/customHeader.go
  2. 1 0
      tools/provider_config_updater/lego

+ 1 - 1
mod/dynamicproxy/customHeader.go

@@ -17,7 +17,7 @@ import (
 // return upstream header and downstream header key-value pairs
 // if the header is expected to be deleted, the value will be set to empty string
 func (ept *ProxyEndpoint) SplitInboundOutboundHeaders() ([][]string, [][]string) {
-	if len(ept.UserDefinedHeaders) == 0 {
+	if len(ept.UserDefinedHeaders) == 0 && ept.HSTSMaxAge == 0 && !ept.EnablePermissionPolicyHeader {
 		//Early return if there are no defined headers
 		return [][]string{}, [][]string{}
 	}

+ 1 - 0
tools/provider_config_updater/lego

@@ -0,0 +1 @@
+Subproject commit d39d57fbc931ddd6f9f914bc2e245acb0a6c3e43