diff --git a/gateway/proxy/proxy.go b/gateway/proxy/proxy.go index d00804e..16ab2a6 100644 --- a/gateway/proxy/proxy.go +++ b/gateway/proxy/proxy.go @@ -4,7 +4,6 @@ import ( "context" "io" "net/http" - "strings" "time" "github.com/gin-gonic/gin" @@ -62,27 +61,8 @@ func response(req *http.Request, c *gin.Context) error { return err } - for key, values := range resp.Header { - // Skip the Vary header if it only contains "Accept" - if key == "Vary" && len(values) == 1 && values[0] == "Accept" { - continue - } - - // Remove "Accept" from the Vary header if it exists - if key == "Vary" { - newValues := []string{} - for _, value := range values { - if value != "Accept" { - newValues = append(newValues, value) - } - } - if len(newValues) > 0 { - c.Header(key, strings.Join(newValues, ", ")) - } - continue - } - - c.Header(key, values[0]) + for key, value := range resp.Header { + c.Header(key, value[0]) } c.Data(resp.StatusCode, resp.Header.Get("Content-Type"), body)