diff --git a/source/auth-connector b/source/auth-connector index 73fe3a3..0b06c25 160000 --- a/source/auth-connector +++ b/source/auth-connector @@ -1 +1 @@ -Subproject commit 73fe3a3c9a87070f9e8ecf9682caba9d77de3f6b +Subproject commit 0b06c252a37b7e957be5767b1821c5cb63123918 diff --git a/source/server/routes/rojos.ts b/source/server/routes/rojos.ts index d64cd94..a3b5c97 100644 --- a/source/server/routes/rojos.ts +++ b/source/server/routes/rojos.ts @@ -97,7 +97,8 @@ router.get( "/tunnels/browse", async ( req, res ) => { const purpose = typeof req.query.purpose === "string" ? req.query.purpose : ""; - const token = req.cookies?.accessToken + const token = req.rawToken + || req.cookies?.accessToken || ( typeof req.headers.authorization === "string" && req.headers.authorization.startsWith( "Bearer " ) ? req.headers.authorization.slice( 7 ) : "" ); @@ -231,7 +232,8 @@ router.post( "/chat", async ( req, res ) => config.model = ep.model || RojosConfig.model; config.apiKey = "not-needed"; - const token = req.cookies?.accessToken + const token = req.rawToken + || req.cookies?.accessToken || ( typeof req.headers.authorization === "string" && req.headers.authorization.startsWith( "Bearer " ) ? req.headers.authorization.slice( 7 ) : "" );