-
Notifications
You must be signed in to change notification settings - Fork 23
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
wrong MIME typ "text/plain" for .js files #241
Comments
Are you sure they are sent with
|
Yes Firefox web console reported that.
|
Looks like a windows-issue, pretty strange though.
|
bootstrap.js
and map loads perfectly with localhost |
looks like an issue with the golang+windows combination: golang/go#32350 (some 3rd-party app changes the registry keys 😕) |
yep my registry returns "text/plain". |
So, what causes it to work with localhost is actually go bug... and failing with 127.0.0.1 is documented feature... interesting 🤔 |
This has to do how the differentiation between dev and release is (was) made: mapserver/public/js/bootstrap.js Lines 2 to 15 in de2a105
Basically: use the "module" script files only if the browser calls the app with "127.0.0.1:8080" Background is that there is a more efficient (only one http-call) release "bundle.js" that should be used instead of the various other .js modules when developing.
I overhauled the bootstrap logic for this now: Lines 30 to 38 in 9fb7bec
This tries to load the bundle first and falls back to the dev-files if it isn't available (not generated/not a release-build for example) Anyway: the mime-type issue isn't fixed with this, i think i'll just hardcode the main mime-types for |
Just tried it and now 127.0.0.1 and localhost work fine. |
fixed with golang/go#32350 |
4.5.0 release (win) serves js files with wrong MIME typ "text/plain" so they aren´t loaded and the page is stuck at "Starting mapserver..."
The text was updated successfully, but these errors were encountered: