Fix typo in default CORS allowed headers

This commit is contained in:
mliang2
2026-05-04 01:28:05 -07:00
committed by GitHub
parent f91bae1257
commit 80103b1db2
@@ -926,7 +926,7 @@ func applyCORSConfiguration(routerName string, ingressConfig ingressConfig, rt *
Headers: &dynamic.Headers{
AccessControlAllowCredentials: ptr.Deref(ingressConfig.EnableCORSAllowCredentials, true),
AccessControlExposeHeaders: ptr.Deref(ingressConfig.CORSExposeHeaders, []string{}),
AccessControlAllowHeaders: ptr.Deref(ingressConfig.CORSAllowHeaders, []string{"DNT", "Keep-Alive", "User-Agent", "X-Requested-With", "If-Modified-Since", "Cache-Control", "Content-Type", "Range,Authorization"}),
AccessControlAllowHeaders: ptr.Deref(ingressConfig.CORSAllowHeaders, []string{"DNT", "Keep-Alive", "User-Agent", "X-Requested-With", "If-Modified-Since", "Cache-Control", "Content-Type", "Range", "Authorization"}),
AccessControlAllowMethods: ptr.Deref(ingressConfig.CORSAllowMethods, []string{"GET", "PUT", "POST", "DELETE", "PATCH", "OPTIONS"}),
AccessControlAllowOriginList: ptr.Deref(ingressConfig.CORSAllowOrigin, []string{"*"}),
AccessControlMaxAge: int64(ptr.Deref(ingressConfig.CORSMaxAge, 1728000)),