Merge pull request #2291 from overleaf/ta-events-validate

Validate Events with Regex

GitOrigin-RevId: f0a57345862ce4daefaa9f01b851d446230ed46d
This commit is contained in:
Timothée Alby 2019-11-04 16:50:34 +07:00 committed by sharelatex
parent 12dd42724c
commit 94707c08ea

View file

@ -4,7 +4,10 @@ const AnalyticsProxy = require('./AnalyticsProxy')
module.exports = {
apply(webRouter, privateApiRouter, publicApiRouter) {
webRouter.post('/event/:event', AnalyticsController.recordEvent)
webRouter.post(
'/event/:event([a-z0-9-_]+)',
AnalyticsController.recordEvent
)
webRouter.put(
'/editingSession/:projectId',