Auth connector rewrite: relative imports, rawToken for tunnel forwarding

This commit is contained in:
Rokojori 2026-07-17 15:49:29 +02:00
parent b2a4890c71
commit 76c912cd0d
2 changed files with 5 additions and 3 deletions

@ -1 +1 @@
Subproject commit 73fe3a3c9a87070f9e8ecf9682caba9d77de3f6b
Subproject commit 0b06c252a37b7e957be5767b1821c5cb63123918

View File

@ -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 )
: "" );