Skip to content

fix: use text/javascript MIME type for local-config.js endpoint#178

Merged
neonwatty merged 2 commits into
mean-weasel:mainfrom
AntoineDeveloppeur:fix/localConfigTest
May 19, 2026
Merged

fix: use text/javascript MIME type for local-config.js endpoint#178
neonwatty merged 2 commits into
mean-weasel:mainfrom
AntoineDeveloppeur:fix/localConfigTest

Conversation

@AntoineDeveloppeur
Copy link
Copy Markdown
Contributor

** Description of problem

After following the self-hosting setup steps, one of the E2E tests fails.
The issue is caused by this command:

cp public/test/local-config.example.js public/test/local-config.js

Screenshot of failed test:
image

The failure happens because MIME type of js file is 'text/javascript' the test needs 'application/javascript'
When test is run again if fails because the copied file contains text, but the test expects the file to be empty (line 65)

** Fix

  • If there is no file, worker now responds with an empty file with 'text/javascript'
  • The test now expects 'text/javascript' instead of 'application/javascript'
  • The test no longer require the file to be empty anymore, allowing it to pass whether the file exist or not. The original intention of emiting missing-resource console errors is preservered.

All tests pass
No documentation update is needed

Copy link
Copy Markdown
Collaborator

@neonwatty neonwatty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed with three independent sub-agents. Added deterministic route coverage for the local-config fallback/pass-through behavior; CI and local E2E are green.

@neonwatty neonwatty added this pull request to the merge queue May 19, 2026
Merged via the queue into mean-weasel:main with commit 8b5ff1b May 19, 2026
7 checks passed
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 1.37.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@neonwatty
Copy link
Copy Markdown
Collaborator

Thanks for fixing this @AntoineDeveloppeur !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants