Skip to content

Commit

Permalink
fix: exclude method options when checking [hash].hot-update.json (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
huuduy005 committed Jul 22, 2024
1 parent abe4500 commit 16bc758
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/server/getDevMiddlewares.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ const applyDefaultMiddlewares = async ({

middlewares.push((req, res, next) => {
// [prevFullHash].hot-update.json will 404 (expected) when rsbuild restart and some file changed
if (req.url?.endsWith('.hot-update.json')) {
if (req.url?.endsWith('.hot-update.json') && req.method !== 'OPTIONS') {
res.statusCode = 404;
res.end();
} else {
Expand Down

0 comments on commit 16bc758

Please sign in to comment.