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

Remove Content-Type auto-detection #6097

Merged
merged 7 commits into from Jan 21, 2020

Conversation

juliens
Copy link
Member

@juliens juliens commented Dec 27, 2019

What does this PR do?

This PR removes the auto-detection of the Content-Type.

Motivation

When the backend doesn't send a Content-Type header, Traefik tried to auto-detect a Content-Type. For a CSS, Traefik will detect text/plain and browser will not interperet css if it's in text/plain and will interpret it if there is no Content-Type.

Fixes #6092 #4761 #3131

More

  • Added/updated tests
  • Added/updated documentation

Co-Authored-By: mpl mathieu.lonjaret@gmail.com

@dtomcej

This comment has been minimized.

@ldez ldez added this to To review in v2 via automation Jan 7, 2020
@derekslenk

This comment has been minimized.

@mpl

This comment has been minimized.

Copy link
Collaborator

@mpl mpl left a comment

Choose a reason for hiding this comment

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

Writing these docs made me realize we might have a naming/hierarchy problem anyway. I'll explain in chat.

pkg/config/dynamic/middlewares.go Outdated Show resolved Hide resolved
pkg/config/dynamic/middlewares.go Show resolved Hide resolved
docs/content/middlewares/contenttype.md Outdated Show resolved Hide resolved
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:

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.

LGTM

@ldez ldez force-pushed the disable-autodetect-contenttype branch from c57ee35 to e1e9c06 Compare January 21, 2020 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
v2
Done
Development

Successfully merging this pull request may close these issues.

None yet

6 participants