Change Regex to support more input variants

References #57
This commit is contained in:
Alexander Stoll 2020-03-25 15:33:32 +01:00 committed by GitHub
parent a78ac014be
commit 6de97f439f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,8 +15,8 @@ function Read-IcingaRESTMessage()
#Path
$PathMatch = $Matches[3];
$PathMatch -match '(.+)\?(.*)' | Out-Null;
$Arguments = $Matches[2];
$PathMatch -match '((\/[^\/\?]+)*)\??([^\/]*)' | Out-Null;
$Arguments = $Matches[3];
$Request.RequestPath.Add('FullPath', $Matches[1]);
$Request.RequestPath.Add('PathArray', $Matches[1].TrimStart('/').Split('/'));