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

Invalid mime type for serving css? #33

Open
jvanveen opened this issue Jul 18, 2024 · 2 comments
Open

Invalid mime type for serving css? #33

jvanveen opened this issue Jul 18, 2024 · 2 comments
Assignees

Comments

@jvanveen
Copy link

It seems that a css file is returned with the incorrect mime type. Any idea what may be wrong?
image

@jvanveen
Copy link
Author

jvanveen commented Jul 18, 2024

As a workaround, I used:

    app.get('/public/*', ({set, params}) => {
        const file = Bun.file(`${import.meta.dir}/../public/${params['*']}`)
        set.headers['Content-Type'] = file.type
        return file.text()
    })

As being mentioned at elysiajs/elysia#524

@bogeychan
Copy link
Collaborator

Thanks for reporting this finding!

Can't reproduce it on my end. Can you give it a try with the latest verion?

image

@bogeychan bogeychan self-assigned this Dec 17, 2024
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