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

Fix / route returning the wrong MIME type #125

Merged
merged 1 commit into from
Feb 6, 2023
Merged

Conversation

j-f1
Copy link
Member

@j-f1 j-f1 commented Feb 6, 2023

*shakes fist at CodeQL for suggesting changing this code*

I didn’t test the change in 58d1300 thoroughly enough, sorry!

Fixes #126

@trafico-bot trafico-bot bot added the 🔍 Ready for Review Pull Request is not reviewed yet label Feb 6, 2023
@@ -36,8 +36,7 @@
});
app.use(express.static(config.webRoot, { index: false }));

let indexHTML = fs.readFileSync(config.webRoot + '/index.html');
app.get('/*', (req, res) => res.send(indexHTML));
app.get('/*', (req, res) => res.sendFile(config.webRoot + '/index.html'));

Check failure

Code scanning / CodeQL

Missing rate limiting

This route handler performs [a file system access](1), but is not rate-limited.
@j-f1 j-f1 mentioned this pull request Feb 6, 2023
@rich-howell rich-howell self-requested a review February 6, 2023 07:38
@trafico-bot trafico-bot bot added ✅ Approved Pull Request has been approved and can be merged and removed 🔍 Ready for Review Pull Request is not reviewed yet labels Feb 6, 2023
@rich-howell rich-howell merged commit 60b183b into master Feb 6, 2023
@rich-howell rich-howell deleted the jed/fix-root-route branch February 6, 2023 07:39
@trafico-bot trafico-bot bot added ✨ Merged Pull Request has been merged successfully and removed ✅ Approved Pull Request has been approved and can be merged labels Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Merged Pull Request has been merged successfully
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Actual app is blank
2 participants