HostFilteringOptions.AllowedHosts 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
允许访问此网站的主机标头。 至少需要一个值。
public:
property System::Collections::Generic::IList<System::String ^> ^ AllowedHosts { System::Collections::Generic::IList<System::String ^> ^ get(); void set(System::Collections::Generic::IList<System::String ^> ^ value); };
public System.Collections.Generic.IList<string> AllowedHosts { get; set; }
member this.AllowedHosts : System.Collections.Generic.IList<string> with get, set
Public Property AllowedHosts As IList(Of String)
属性值
注解
- 必须排除端口号。
- 顶级通配符“*”允许所有非空主机。
- 允许使用子域通配符。 例如,“*.example.com”匹配 foo.example.com 等子域,但与父域 example.com 匹配。
- 允许使用 Unicode 主机名,但将转换为 punycode 进行匹配。
- IPv6 地址必须包含其边界括号,并且必须采用规范化形式。
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈