mirror of
https://github.com/unraid/api.git
synced 2025-12-31 13:39:52 -06:00
fix: pull token from query not params
This commit is contained in:
@@ -20,7 +20,7 @@ export class UserCookieStrategy extends PassportStrategy(Strategy, strategyName)
|
||||
public validate = async (req: CustomRequest): Promise<any> => {
|
||||
return (
|
||||
this.authService.validateCsrfToken(
|
||||
req.headers['x-csrf-token'] || (req.params as { csrf_token?: string })?.csrf_token
|
||||
req.headers['x-csrf-token'] || (req.query as { csrf_token?: string })?.csrf_token
|
||||
) && this.authService.validateCookiesCasbin(req.cookies)
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user