Werk #13049: RESTAPI: require accept header

Komponente Core & Setup
Titel RESTAPI: require accept header
Datum 05.10.2021
Checkmk-Editon Checkmk Raw (CRE)
Checkmk-Version 2.1.0i1
Level Kleine Änderung
Klasse Neues Feature
Kompatibilität Inkompatibel - Manuelle Interaktion könnte erforderlich sein

In previous version the accept header of the HTTP-request was completely ignored.

With this werk the accept header is obligatory. If no or a wrong accept header is provided an error with a 406 status code will be returned.

For most requests this means you have to provide the follwing header line:

Accept: application/json

For some other requests different accept headers may be required. All headers are documented in the official rest-api documentation.

For example when downloading the agent binary the following header is required:

Accept: application/octet-stream

Zur Liste aller Werks