icinga-powershell-framework/lib/webserver/Get-IcingaRESTHeaderValue.psm1
Lord Hepipud 3d875639e4 Feature Requests: Add Proxy Server support
Also re-arranges web content by using old content from lib/web into lib/webserver, while new lib/web contains the proxy configuration.
Fixes #19
2020-11-19 17:16:33 +01:00

17 lines
376 B
PowerShell

function Get-IcingaRESTHeaderValue()
{
param(
[hashtable]$Request = @{},
[string]$Header = $null
);
if ($null -eq $Request -or [string]::IsNullOrEmpty($Header) -Or $Request.Count -eq 0) {
return $null;
}
if ($Request.Header.ContainsKey($Header) -eq $FALSE) {
return $null
}
return $Request.Header[$Header];
}