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

Unstyled account recovery page due to incorrect mime type #45

Open
justindotpub opened this issue Mar 2, 2022 · 1 comment
Open

Unstyled account recovery page due to incorrect mime type #45

justindotpub opened this issue Mar 2, 2022 · 1 comment

Comments

@justindotpub
Copy link
Contributor

Summary

Problem

During account recovery via email (without an account recovery kit), after clicking "Recover Account" in the email, the resulting page's css is blocked due to text/plain MIME type.

Impact

The page appears unstyled.

Detail

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'https://dashboard.fission.codes/recover/'
  2. Click on 'I don't have a recovery kit'
  3. Enter account username
  4. Click 'Send Email'
  5. When 'Recover your Fission account' email arrives, click 'Recover Account' in the email
  6. See unstyled page and error in console

Screenshots
blocked-css-due-to-mime-type

Desktop (please complete the following information):

  • OS: macOS
  • Browser: FireFox Developer Edition and Brave
@matheus23
Copy link
Member

Can replicate this.

Workaround: Hard-reload the page.

I need help with this: I don't know how we could prevent this. I think what happens is that this nosniff header is sent when you're opening new tabs from gmail. If you just copy the link as a URL and paste it into the address bar, it works.
I don't think we can make gmail not send this header.

The header basically says "don't try to figure out the MIME type from reading the file" ("sniffing the file").

Ideally, the IPFS gateway would just send the correct file type with the file, but it doesn't. Can we fix that? Can we make IPFS return application/css mime types for .css files?

May be related: ipfs/kubo#2164 Although it likely already supports css. Not sure why the go-ipfs-side sniffing doesn't work.

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