Skip to content

Commit

Permalink
Add limiter to auth token endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanc19 committed Sep 3, 2024
1 parent cc70407 commit 8b08d2f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/server/routes/nhsBsaApi/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ const express = require('express');
const router = express.Router();
const generateJWT = require('../../utils/security/NHSBSAgenerateJWT');
const config = require('../../config/config');
const { nhsBsaApiLimiter } = require('../../utils/middleware/rateLimitingNHSBSAAPI');

router.use('/', nhsBsaApiLimiter);
router.route('/').get(function (req, res) {

const authHeader = req.headers && req.headers.nhsbsaapikey;
const nhsBsaApiKey = config.get('nhsBsaApi.apikey');

Expand Down

0 comments on commit 8b08d2f

Please sign in to comment.