fix(socketio): allow authorization header without cookies (#34199)
Resolves #34125 Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
parent
7d69afb9c4
commit
7ddff768a8
1 changed files with 6 additions and 2 deletions
|
|
@ -16,8 +16,12 @@ function authenticate_with_frappe(socket, next) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!socket.request.headers.cookie) {
|
if (!socket.request.headers.cookie && !socket.request.headers.authorization) {
|
||||||
next(new Error("No cookie transmitted."));
|
next(
|
||||||
|
new Error(
|
||||||
|
"Missing cookie and authorization header. Either one needed for authentication."
|
||||||
|
)
|
||||||
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue