8 writes to AllowedHosts
HostFilteringSample (1)
Startup.cs (1)
33options.AllowedHosts = (hosts?.Length > 0 ? hosts : new[] { "*" });
Microsoft.AspNetCore (1)
WebHost.cs (1)
261options.AllowedHosts = (hosts?.Length > 0 ? hosts : new[] { "*" });
Microsoft.AspNetCore.HostFiltering.Tests (6)
HostFilteringMiddlewareTests.cs (3)
148options.AllowedHosts = allowedHost.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries); 200options.AllowedHosts = allowedHost.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries); 240options.AllowedHosts = new[] { config["AllowedHosts"] };
MiddlewareConfigurationManagerTests.cs (3)
20AllowedHosts = new List<string>() { "*" }, 46AllowedHosts = allowedHost.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries), 75AllowedHosts = new List<string>() { "localhost;foo.example.com.bar:443" },
18 references to AllowedHosts
CreateDefaultBuilderOfTApp (1)
Program.cs (1)
38var hosts = string.Join(',', hostFilteringOptions.Value.AllowedHosts);
HostFilteringSample (2)
Startup.cs (2)
28if (options.AllowedHosts == null || options.AllowedHosts.Count == 0)
Microsoft.AspNetCore (2)
WebHost.cs (2)
256if (options.AllowedHosts == null || options.AllowedHosts.Count == 0)
Microsoft.AspNetCore.HostFiltering (3)
MiddlewareConfigurationManager.cs (3)
47if (options.AllowedHosts?.Count > 0 && !TryProcessHosts(options.AllowedHosts, allowedHosts)) 93return $"{{AllowedHosts = {string.Join("; ", hostFilteringOptions.AllowedHosts)}, AllowEmptyHosts = {hostFilteringOptions.AllowEmptyHosts}, IncludeFailureMessage = {hostFilteringOptions.IncludeFailureMessage}}}";
Microsoft.AspNetCore.HostFiltering.Tests (6)
HostFilteringMiddlewareTests.cs (2)
52options.AllowedHosts.Add("Localhost"); 93options.AllowedHosts.Add("Localhost");
MiddlewareConfigurationManagerTests.cs (4)
41Assert.True(options.AllowedHosts.All(x => configurationBeforeChange.AllowedHosts.Contains(x))); 64Assert.True(newOption.AllowedHosts.All(x => configurationAfterChange.AllowedHosts.Contains(x))); 88Assert.True(options.AllowedHosts.All(x => result1.AllowedHosts.Contains(x)) && options.AllowedHosts.Count.Equals(result1.AllowedHosts.Count));
Microsoft.AspNetCore.Tests (4)
WebApplicationTests.cs (2)
1366Assert.Contains("*", options.AllowedHosts); 1378Assert.Contains("NewHost", options.AllowedHosts);
WebHostTests.cs (2)
42Assert.Contains("*", options.AllowedHosts); 54Assert.Contains("NewHost", options.AllowedHosts);