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 3d28a0d commit 5ec84a4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions server/src/proxy/decorator-intern-proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,15 @@ const setup = (app: Express) => {
}),
);

console.log('here');
app.use(
'/modiacontextholder/redirect/',
'/modiacontextholder/redirect',
proxy(process.env.MODIACONTEXTHOLDER_URL, {
proxyReqOptDecorator: async (
options: RequestOptions,
req: Request<{}, any, any, ParsedQs, Record<string, any>>,
) => {
console.log('Request OBO token');
console.log('Request OBO token', req);
const accessToken = await requestOboToken(process.env.MODIACONTEXTHOLDER_API_SCOPE, req);
if (options?.headers) {
options.headers.Authorization = `Bearer ${accessToken}`;
Expand Down

0 comments on commit 5ec84a4

Please sign in to comment.