28 references to Headers
Microsoft.AspNetCore.Cors (9)
Infrastructure\CorsPolicy.cs (4)
33
if (
Headers
== null ||
Headers
.Count != 1 ||
Headers
[0] != CorsConstants.AnyHeader)
167
builder.AppendJoin(",",
Headers
);
Infrastructure\CorsPolicyBuilder.cs (4)
101
_policy.
Headers
.Add(req);
184
_policy.
Headers
.Clear();
185
_policy.
Headers
.Add(CorsConstants.AnyHeader);
248
WithHeaders(policy.
Headers
.ToArray());
Infrastructure\CorsService.cs (1)
125
policy.
Headers
;
Microsoft.AspNetCore.Cors.Test (19)
CorsMiddlewareTests.cs (1)
162
policy.
Headers
.Add("Header1");
CorsPolicyBuilderTests.cs (10)
15
originalPolicy.
Headers
.Add("Existing");
32
Assert.NotSame(originalPolicy.
Headers
, corsPolicy.
Headers
);
33
Assert.Equal(originalPolicy.
Headers
, corsPolicy.
Headers
);
63
Assert.Empty(corsPolicy.
Headers
);
81
Assert.Empty(corsPolicy.
Headers
);
105
Assert.Empty(corsPolicy.
Headers
);
259
Assert.Equal(new List<string>() { "example1", "example2" }, corsPolicy.
Headers
);
274
Assert.Equal(new List<string>() { "*" }, corsPolicy.
Headers
);
CorsPolicyTests.cs (3)
20
Assert.Empty(corsPolicy.
Headers
);
68
corsPolicy.
Headers
.Add("foo");
69
corsPolicy.
Headers
.Add("bar");
CorsServiceTests.cs (5)
482
policy.
Headers
.Add(CorsConstants.AnyHeader);
505
policy.
Headers
.Add(CorsConstants.AnyHeader);
528
policy.
Headers
.Add("match");
529
policy.
Headers
.Add("foo");
548
policy.
Headers
.Add(CorsConstants.AnyHeader);