25 references to AccessControlRequestMethod
Microsoft.AspNetCore.Cors (2)
Infrastructure\CorsMiddleware.cs (1)
120
var isCorsPreflightRequest = isOptionsRequest && context.Request.Headers.ContainsKey(CorsConstants.
AccessControlRequestMethod
);
Infrastructure\CorsService.cs (1)
72
var isPreflightRequest = isOptionsRequest && requestHeaders.ContainsKey(CorsConstants.
AccessControlRequestMethod
);
Microsoft.AspNetCore.Cors.Test (8)
CorsMiddlewareTests.cs (7)
195
.AddHeader(CorsConstants.
AccessControlRequestMethod
, "PUT")
260
.AddHeader(CorsConstants.
AccessControlRequestMethod
, "PUT")
323
.AddHeader(CorsConstants.
AccessControlRequestMethod
, "PUT")
482
.AddHeader(CorsConstants.
AccessControlRequestMethod
, "PUT")
660
httpContext.Request.Headers.Add(CorsConstants.
AccessControlRequestMethod
, new[] { "PUT" });
759
httpContext.Request.Headers.Add(CorsConstants.
AccessControlRequestMethod
, new[] { "GET" });
791
httpContext.Request.Headers.Add(CorsConstants.
AccessControlRequestMethod
, new[] { "GET" });
CorsServiceTests.cs (1)
963
context.Request.Headers.Add(CorsConstants.
AccessControlRequestMethod
, new[] { accessControlRequestMethod });
Microsoft.AspNetCore.Mvc.Cors (2)
CorsAuthorizationFilter.cs (1)
90
httpContext.Request.Headers[CorsConstants.
AccessControlRequestMethod
];
DisableCorsAuthorizationFilter.cs (1)
27
context.HttpContext.Request.Headers[CorsConstants.
AccessControlRequestMethod
];
Microsoft.AspNetCore.Mvc.Cors.Test (3)
CorsAuthorizationFilterTest.cs (1)
139
httpContext.Request.Headers.Add(CorsConstants.
AccessControlRequestMethod
, new[] { headers.Method });
DisableCorsAuthorizationFilterTest.cs (2)
22
httpContext.Request.Headers.Add(CorsConstants.
AccessControlRequestMethod
, "PUT");
63
httpContext.Request.Headers.Add(CorsConstants.
AccessControlRequestMethod
, "PUT");
Microsoft.AspNetCore.Mvc.FunctionalTests (10)
CorsTests.cs (1)
18
request.Headers.Add(CorsConstants.
AccessControlRequestMethod
, "POST");
CorsTestsBase.cs (9)
82
request.Headers.Add(CorsConstants.
AccessControlRequestMethod
, "POST");
100
request.Headers.Add(CorsConstants.
AccessControlRequestMethod
, "POST");
123
request.Headers.Add(CorsConstants.
AccessControlRequestMethod
, method);
192
request.Headers.Add(CorsConstants.
AccessControlRequestMethod
, "PUT");
277
request.Headers.Add(CorsConstants.
AccessControlRequestMethod
, method);
302
request.Headers.Add(CorsConstants.
AccessControlRequestMethod
, "GET");
334
request.Headers.Add(CorsConstants.
AccessControlRequestMethod
, "GET");
373
request.Headers.Add(CorsConstants.
AccessControlRequestMethod
, "GET");
396
request.Headers.Add(CorsConstants.
AccessControlRequestMethod
, "GET");