fix(socketio): allow authorization header without cookies (#34199)

Resolves #34125

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
Akhil Narang 2025-09-30 11:54:23 +05:30 committed by GitHub
parent 7d69afb9c4
commit 7ddff768a8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;
} }