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

Please add Content-Type header in all responses #254

Open
bhechinger opened this issue Jan 24, 2020 · 3 comments
Open

Please add Content-Type header in all responses #254

bhechinger opened this issue Jan 24, 2020 · 3 comments

Comments

@bhechinger
Copy link

I'm having a difficult time getting adminui to work behind Traefik. The best theory we have is that because Content-Type isn't being set by adminui Traefik is trying to guess what it is and sets it to application/x-gzip which results in just getting a downloaded .gz file instead of a rendered page.

@bhechinger
Copy link
Author

@bahamat Just an FYI I had Traefik add Content-Type: text/html and it tried to render the page. Except that obviously broke JS and CSS content, but I feel like that's pretty good validation that our theory is correct.

@bahamat
Copy link
Member

bahamat commented Jan 29, 2020

This can be worked around by configuring traefik not to add content-type headers based on sniffed payload (which it mis-identifies).

I'll leave this open for now, since it may be better for AdminUI to always explicitly set the content type, but for now the best option is for proxies to not add content type headers, and leave content type sniffing up to the browser.

@bhechinger
Copy link
Author

The needed part for Traefik is this: https://docs.traefik.io/middlewares/contenttype/

I do also agree that it would be best if Content-Type were explicitly set by adminui but this does indeed work in the meantime.

Thanks for all your help @bahamat, you're the best!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants