From f0e824edc768ddfc4540410bc07094f2865c8771 Mon Sep 17 00:00:00 2001 From: James Brundage <@github.com> Date: Sat, 4 May 2024 12:18:05 -0700 Subject: [PATCH] feat: HTtpListenerRequest.get_HostName ( Fixes #1118 ) --- Types/HttpListener/HttpListenerRequest/Alias.psd1 | 1 + Types/HttpListener/HttpListenerRequest/get_HostName.ps1 | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 Types/HttpListener/HttpListenerRequest/get_HostName.ps1 diff --git a/Types/HttpListener/HttpListenerRequest/Alias.psd1 b/Types/HttpListener/HttpListenerRequest/Alias.psd1 index 4b67c95e8..670066da5 100644 --- a/Types/HttpListener/HttpListenerRequest/Alias.psd1 +++ b/Types/HttpListener/HttpListenerRequest/Alias.psd1 @@ -1,4 +1,5 @@ @{ IP = 'IPAddress' + HostHeader = 'HostName' QueryParameters = 'QueryParameter' } \ No newline at end of file diff --git a/Types/HttpListener/HttpListenerRequest/get_HostName.ps1 b/Types/HttpListener/HttpListenerRequest/get_HostName.ps1 new file mode 100644 index 000000000..9e747c11e --- /dev/null +++ b/Types/HttpListener/HttpListenerRequest/get_HostName.ps1 @@ -0,0 +1,8 @@ +<# +.SYNOPSIS + Gets the host name of the request. +.DESCRIPTION + Gets the host name of the request (the domain being requested). +#> +param() +$this.Url.DNSSafeHost