Skip to content

Commit

Permalink
test. debug
Browse files Browse the repository at this point in the history
  • Loading branch information
eirikv committed Aug 7, 2024
1 parent 9565221 commit 3d28a0d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions server/src/proxy/decorator-intern-proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,15 @@ const setup = (app: Express) => {
options: RequestOptions,
req: Request<{}, any, any, ParsedQs, Record<string, any>>,
) => {
console.log('Request OBO token');
const accessToken = await requestOboToken(process.env.MODIACONTEXTHOLDER_API_SCOPE, req);
if (options?.headers) {
options.headers.Authorization = `Bearer ${accessToken}`;
let cookies = options.headers.cookie;
cookies = 'innlogget-part=VEILEDER; ' + cookies;
options.headers.cookie = cookies;
}
console.log('options', options);
return options;
},
}),
Expand Down

0 comments on commit 3d28a0d

Please sign in to comment.