Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR re-adds content negotiation in a minimal (hard-coded) way. Every actuator uses the same, single media type, which is not extensible. An error is returned when an incompatible
Content-Type
orAccept
header is used.My concern is that adding content negotiation support after the release of Steeltoe v4 will be a breaking change. This PR ensures that incompatible
Content-Type
andAccept
headers are blocked. This enables Steeltoe to support additional content types in the future and introduce interfaces and/or configuration for third-party actuators to participate in the process, without suddenly starting to fail on requests that used to succeed.I haven't done any testing with Cloud Foundry, Prometheus or Spring Boot Admin yet. We should verify they are compatible with the changes in this PR before merging it.
Quality checklist
If your change affects other repositories, such as Documentation, Samples and/or MainSite, add linked PRs here.