Merge pull request #1512 from sharelatex/as-rate-limit-confirm-uni-domain-endpoint

Rate limit confirm university domain endpoint

GitOrigin-RevId: 1d03eec3c0e8208e5f643000693f685957e15442
This commit is contained in:
Chrystal Maria Griffiths 2019-02-15 13:16:39 +00:00 committed by sharelatex
parent 96f283e2c6
commit d52c30f272

View file

@ -403,7 +403,11 @@ module.exports = class Router
),
AuthenticationController.httpAuth,
CompileController.getFileFromClsiWithoutUser
publicApiRouter.post '/api/institutions/confirm_university_domain', AuthenticationController.httpAuth, InstitutionsController.confirmDomain
publicApiRouter.post '/api/institutions/confirm_university_domain', RateLimiterMiddlewear.rateLimit({
endpointName: 'confirm-university-domain',
maxRequests: 1,
timeInterval: 60
}), AuthenticationController.httpAuth, InstitutionsController.confirmDomain
webRouter.get '/chrome', (req, res, next) ->
# Match v1 behaviour - this is used for a Chrome web app