Skip to content

Commit

Permalink
f Send inn origin til cors
Browse files Browse the repository at this point in the history
- godta requester fra dev.nav.no selv om vi kjører på intern.dev.nav.no
  • Loading branch information
jstnhlj committed Mar 10, 2023
1 parent 2c9ec0a commit ae1ea43
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,11 @@ import nivaa4Authentication from './middleware/nivaa4-authentication';
const PORT = 3000;
const app = express();
const router = express.Router();

app.use(cookieParser());
app.use(bodyParser.json());
app.use(pinoHttpMiddleware());
app.use(helmet());
app.use(cors());
app.use(cors({ origin: /\.nav\.no$/ }));
app.disable('x-powered-by');

async function setUpRoutes() {
Expand Down

0 comments on commit ae1ea43

Please sign in to comment.