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

MIME Type error for static directory. #5242

Open
tufanobenjamin opened this issue Aug 18, 2023 · 1 comment
Open

MIME Type error for static directory. #5242

tufanobenjamin opened this issue Aug 18, 2023 · 1 comment

Comments

@tufanobenjamin
Copy link

Hey so i have a strange problem. I have two react apps on the same express server that I'm serving as two different routes using app.use('/', express.static('./path_to_app')); and app.use('/map', express.static('./path_to_app_two'). there are a lot of other things going on with the express server and everything runs fine accept one react app works fine and the second one, well call map here, is sending css and js files with the wrong MIME type. Let me know what you want to see posted and I can supply it, or if this is a common issue aswell let me know. I have cleaned my cache and reinstalled all required modules. Its just strange that the same code works for one app but not the other.

@jaitjacob
Copy link

Hi @tufanobenjamin, so Express is incorrectly setting MIME type for the second react app? I would like to replicate this issue. Is there a way you can reveal the line of express code that is serving the css/js file?

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