You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
assert.NoError(s.T(), err, "cors preflight should not return errors")
440
+
assert.Equal(s.T(), 204, corsResp.StatusCode, "cors should return 204 as the list is empty")
440
441
441
442
preflight:=corsResp.Header
442
443
assert.Equal(s.T(), "https://foo.client.com", preflight.Get("Access-Control-Allow-Origin"), "origin must be in the response headers")
443
444
assert.Equal(s.T(), "POST", preflight.Get("Access-Control-Allow-Methods"), "allowed methods must be in the response headers")
444
445
assert.Equal(s.T(), "600", preflight.Get("Access-Control-Max-Age"), "allowed max age must be in the response headers")
445
-
assert.Equal(s.T(), "Origin, X-Something-Custom, X-Grpc-Web, Accept", preflight.Get("Access-Control-Allow-Headers"), "allowed headers must be in the response headers")
446
+
assert.Equal(s.T(), strings.ToLower("Origin, X-Something-Custom, X-Grpc-Web, Accept"), strings.ToLower(preflight.Get("Access-Control-Allow-Headers")), "allowed headers must be in the response headers")
@@ -514,7 +515,7 @@ func (s *GrpcWebWrapperTestSuite) TestCORSPreflight_EndpointsOnlyTrueWithHandler
514
515
assert.Equal(s.T(), "https://foo.client.com", preflight.Get("Access-Control-Allow-Origin"), "origin must be in the response headers")
515
516
assert.Equal(s.T(), "POST", preflight.Get("Access-Control-Allow-Methods"), "allowed methods must be in the response headers")
516
517
assert.Equal(s.T(), "600", preflight.Get("Access-Control-Max-Age"), "allowed max age must be in the response headers")
517
-
assert.Equal(s.T(), "Origin, X-Something-Custom, X-Grpc-Web, Accept", preflight.Get("Access-Control-Allow-Headers"), "allowed headers must be in the response headers")
518
+
assert.Equal(s.T(), strings.ToLower("Origin, X-Something-Custom, X-Grpc-Web, Accept"), strings.ToLower(preflight.Get("Access-Control-Allow-Headers")), "allowed headers must be in the response headers")
0 commit comments