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

Closed
ghost opened this issue Jul 18, 2024 · 3 comments
Closed

Invalid mime type for serving css? #33

ghost opened this issue Jul 18, 2024 · 3 comments
Assignees

Comments

@ghost
Copy link

ghost commented Jul 18, 2024

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

@ghost
Copy link
Author

ghost 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
@bogeychan
Copy link
Collaborator

Closing this due to inactivity

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

1 participant