 		webRouter.post '/admin/messages', AuthorizationMiddlewear.ensureUserIsSiteAdmin, AdminController.createMessage
 		webRouter.post '/admin/messages/clear', AuthorizationMiddlewear.ensureUserIsSiteAdmin, AdminController.clearMessages
 
-		apiRouter.get '/perfTest', (req,res)->
+		privateApiRouter.get '/perfTest', (req,res)->
 			res.send("hello")
 
 		webRouter.get '/status', (req,res)->
 			res.send("web sharelatex is alive (web)")
-		apiRouter.get '/status', (req,res)->
+		privateApiRouter.get '/status', (req,res)->
 			res.send("web sharelatex is alive (api)")
 
 		webRouter.get '/dev/csrf', (req, res) ->
 			res.send res.locals.csrfToken
 
 		webRouter.get '/health_check', HealthCheckController.check
-		apiRouter.get '/health_check', HealthCheckController.check
+		privateApiRouter.get '/health_check', HealthCheckController.check
 
 		webRouter.get '/health_check/redis', HealthCheckController.checkRedis
-		apiRouter.get '/health_check/redis', HealthCheckController.checkRedis
+		privateApiRouter.get '/health_check/redis', HealthCheckController.checkRedis
 
 		webRouter.get "/status/compiler/:Project_id", AuthorizationMiddlewear.ensureUserCanReadProject, (req, res) ->
 			project_id = req.params.Project_id

			require("./models/Project").Project.findOne {}, () ->
				throw new Error("Test error")

		apiRouter.get '/opps-small', (req, res, next)->
			logger.err "test error occured"
			res.send()


_ = require("underscore")

module.exports = class Router
	constructor: (webRouter, privateApiRouter, publicApiRouter)->
		if !Settings.allowPublicAccess
			webRouter.all '*', AuthenticationController.requireGlobalLogin

