Skip to content

Commit

Permalink
Gjøre endringer i routing på uinnloggede server også
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasDybdahl committed Nov 12, 2024
1 parent addb5aa commit 5479b8b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server-uinnlogget/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import {
logger,
serverConfig,
setupActuators,
setupAndServeHtml,
setupServerDefaults,
setupAndServeHtml
} from '@navikt/fp-server-utils';

import { configureReverseProxyApi } from './reverseProxy';
Expand All @@ -17,10 +17,13 @@ setupServerDefaults(server);
setupActuators(server);

const router = express.Router();
const publicRouter = express.Router();

// Logging i json format
server.use(logger.morganMiddleware);

publicRouter.use(express.static('./public', { index: false }));
server.use(serverConfig.app.publicPath, publicRouter);

configureReverseProxyApi(router);
// Catch all route, må være sist
Expand Down

0 comments on commit 5479b8b

Please sign in to comment.