5 references to MatchesAny
Microsoft.AspNetCore.HostFiltering (1)
HostFilteringMiddleware.cs (1)
103
if (allowedHosts is not null && HostString.
MatchesAny
(new StringSegment(host), allowedHosts))
Microsoft.AspNetCore.Http.Abstractions.Tests (3)
HostStringTest.cs (3)
146
Assert.True(HostString.
MatchesAny
(host, new StringSegment[] { pattern }));
165
Assert.False(HostString.
MatchesAny
(host, new StringSegment[] { pattern }));
171
Assert.Throws<FormatException>(() => HostString.
MatchesAny
("example.com:1abc", new StringSegment[] { "example.com" }));
Microsoft.AspNetCore.HttpOverrides (1)
ForwardedHeadersMiddleware.cs (1)
276
&& (_allowAllHosts || HostString.
MatchesAny
(set.Host, _allowedHosts!)))