Merge pull request #18164 from overleaf/rd-remove-endpoints

[web] Remove publicly accessible endpoints

GitOrigin-RevId: c8e57faf6418274cac36b6e721c97a4ca70a1193
This commit is contained in:
Rebeka Dekany 2024-04-30 15:33:43 +02:00 committed by Copybot
parent 417de9ee87
commit 62c2937dac

View file

@ -1324,28 +1324,6 @@ function initialize(webRouter, privateApiRouter, publicApiRouter) {
} }
) )
webRouter.get('/no-cache', function (req, res, next) {
res.header('Cache-Control', 'max-age=0')
res.sendStatus(404)
})
webRouter.get('/oops-express', (req, res, next) =>
next(new Error('Test error'))
)
webRouter.get('/oops-internal', function (req, res, next) {
throw new Error('Test error')
})
webRouter.get('/oops-mongo', (req, res, next) =>
require('./models/Project').Project.findOne({}, function () {
throw new Error('Test error')
})
)
privateApiRouter.get('/opps-small', function (req, res, next) {
logger.err('test error occured')
res.sendStatus(200)
})
webRouter.post('/error/client', function (req, res, next) { webRouter.post('/error/client', function (req, res, next) {
logger.warn( logger.warn(
{ err: req.body.error, meta: req.body.meta }, { err: req.body.error, meta: req.body.meta },