From 4dbb128b2bb6af2b0486fbe5f5b98c0a3b822b45 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Thu, 11 Jul 2024 12:49:18 +0200 Subject: [PATCH] REST API: in the Server header, identify the software, not the machine --- doc/100-General/10-Changelog.md | 1 + lib/webserver/New-IcingaTCPClientRESTMessage.psm1 | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/100-General/10-Changelog.md b/doc/100-General/10-Changelog.md index a74f0f3..b1579f5 100644 --- a/doc/100-General/10-Changelog.md +++ b/doc/100-General/10-Changelog.md @@ -16,6 +16,7 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic * [#729](https://github.com/Icinga/icinga-powershell-framework/issues/729) Fixes `Update-Icinga` to print an error in case a component is not installed, instead of silently continue * [#734](https://github.com/Icinga/icinga-powershell-framework/issues/734) Fixes a scenario on which a JEA service could become orphaned while manually stopping the Icinga for Windows service, without gracefully shutting down JEA * [#735](https://github.com/Icinga/icinga-powershell-framework/pull/735) Fixes an issue with filter for EventLog events, which did not properly handle multiple event id includes, causing empty results +* [#743](https://github.com/Icinga/icinga-powershell-framework/pull/743) In the REST API response header `Server`, tell the software version, not the machine name (RFC 9110) * [#745](https://github.com/Icinga/icinga-powershell-framework/pull/745) Fixes an issue for service provider with service names not interpreted correctly in case it contains `[]` ### Enhancements diff --git a/lib/webserver/New-IcingaTCPClientRESTMessage.psm1 b/lib/webserver/New-IcingaTCPClientRESTMessage.psm1 index 8708374..9c0ba53 100644 --- a/lib/webserver/New-IcingaTCPClientRESTMessage.psm1 +++ b/lib/webserver/New-IcingaTCPClientRESTMessage.psm1 @@ -39,8 +39,8 @@ function New-IcingaTCPClientRESTMessage() (New-IcingaNewLine) ), [string]::Format( - 'Server: {0}{1}', - (Get-IcingaHostname -LowerCase $TRUE -AutoUseFQDN $TRUE), + 'Server: IcingaForWindows/{0}{1}', + (Get-Module -Name icinga-powershell-framework).Version, (New-IcingaNewLine) ), [string]::Format(