mirror of
https://github.com/whyour/qinglong.git
synced 2026-03-30 03:15:25 +08:00
fix: add /open/user/init paths to init guard to prevent auth bypass
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
This commit is contained in:
parent
7ee3ca6b3e
commit
8adde83184
|
|
@ -98,7 +98,14 @@ export default ({ app }: { app: Application }) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
app.use(async (req, res, next) => {
|
app.use(async (req, res, next) => {
|
||||||
if (!['/api/user/init', '/api/user/notification/init'].includes(req.path)) {
|
if (
|
||||||
|
![
|
||||||
|
'/api/user/init',
|
||||||
|
'/api/user/notification/init',
|
||||||
|
'/open/user/init',
|
||||||
|
'/open/user/notification/init',
|
||||||
|
].includes(req.path)
|
||||||
|
) {
|
||||||
return next();
|
return next();
|
||||||
}
|
}
|
||||||
const authInfo =
|
const authInfo =
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user