Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding content-header to api endpoints #5019

Merged

Conversation

dalanmiller
Copy link
Contributor

@dalanmiller dalanmiller commented Jun 25, 2019

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

HTTP/1.1 200 OK
X-Next-Page: 1
Date: Tue, 25 Jun 2019 13:30:58 GMT
Content-Length: 1338
Content-Type: text/plain; charset=utf-8

More

  • Added/updated tests
  • Added/updated documentation

Additional Notes

Copy link
Member

@ldez ldez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 👍

Copy link
Contributor

@dtomcej dtomcej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
:shipit:

@traefiker traefiker force-pushed the dalanmiller/adding-content-type-header branch from f6d9365 to e184d7c Compare June 25, 2019 15:32
@traefiker traefiker merged commit 53779d6 into traefik:v2.0 Jun 25, 2019
@dalanmiller dalanmiller deleted the dalanmiller/adding-content-type-header branch July 3, 2019 04:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api kind/enhancement a new or improved feature. size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants