Auth connector rewrite: relative imports, rawToken for tunnel forwarding
This commit is contained in:
parent
b2a4890c71
commit
76c912cd0d
|
|
@ -1 +1 @@
|
|||
Subproject commit 73fe3a3c9a87070f9e8ecf9682caba9d77de3f6b
|
||||
Subproject commit 0b06c252a37b7e957be5767b1821c5cb63123918
|
||||
|
|
@ -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 )
|
||||
: "" );
|
||||
|
|
|
|||
Loading…
Reference in New Issue