Adding content-header to api endpoints #5019
Merged
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.
What does this PR do?
This PR (re-?)adds
Content-Type
to the Traefik/api
endpoints.I'm unsure if I'm meeting the testing standards but I modified as little as I thought was necessary. Completely happy to receive feedback as I'm not primarily a Golang developer.
Motivation
I noticed in the recent
alpha7
that the raw JSON being returned was not being formatted nicely in Firefox anymore. This was working in the past, but I didn't notice any changes to this file which would've added this in the history. I may be unaware of the appropriate Headers being added in some other http middleware.Example response headers from
alpha7
/api/rawdata
More
Additional Notes