Skip to content

Commit 4b0b20d

Browse files
authored
Merge pull request #452 from kairyou/master
fix CJK characters cause a 301 redirect loop
2 parents 89bbe0f + 5e630d9 commit 4b0b20d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ app.use(async (req, res) => {
177177
}
178178

179179
const locationState = store.getState().router.location;
180-
if (req.originalUrl !== locationState.pathname + locationState.search) {
180+
if (decodeURIComponent(req.originalUrl) !== decodeURIComponent(locationState.pathname + locationState.search)) {
181181
return res.redirect(301, locationState.pathname);
182182
}
183183

0 commit comments

Comments
 (0)