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;
|
||||
}
|
||||
|
||||
if (!socket.request.headers.cookie) {
|
||||
next(new Error("No cookie transmitted."));
|
||||
if (!socket.request.headers.cookie && !socket.request.headers.authorization) {
|
||||
next(
|
||||
new Error(
|
||||
"Missing cookie and authorization header. Either one needed for authentication."
|
||||
)
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue