Skip to content

Commit

Permalink
kodeverk åpent
Browse files Browse the repository at this point in the history
  • Loading branch information
sindredl committed Aug 9, 2024
1 parent 50aca1d commit 758db92
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions server/src/proxy/api-proxy.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { requestOboToken } from '../auth';
import { Express } from 'express';
import proxy from 'express-http-proxy';
import { Request } from 'express-serve-static-core';
import { createProxyMiddleware } from 'http-proxy-middleware';
import proxy from 'express-http-proxy';
import { ParsedQs } from 'qs';
import { requestOboToken } from '../auth';

const tokenxSetup = (app: Express): void => {
console.log('api-proxy setup for tokenx');
Expand All @@ -20,6 +20,11 @@ const setup = (app: Express, audience: string) => {
res.status(401).send();
});

app.use('/tiltaksgjennomforing/api/kodeverk', (req, res, next) => {
console.log('api/kodeverk');
next();
});

app.use('/tiltaksgjennomforing/api', (req, res, next) => {
console.log('apiProxy /tiltaksgjennomforing/api');
if (!req.headers['authorization']) {
Expand Down

0 comments on commit 758db92

Please sign in to comment.