diff --git a/server/auth.coffee b/server/auth.coffee index 239e99f..3b27f50 100644 --- a/server/auth.coffee +++ b/server/auth.coffee @@ -29,7 +29,7 @@ loggedin = false exports.middleware = -> (req, res, next) -> cookies = new Cookies( req, res ) - return next() if req.path.match(/^\/css|^\/js|^\/fonts|^\/Sprites|^\/tiers|^\/pokemon|^\/replays\/\b/) + return next() if req.path.match(/^\/css|^\/js|^\/fonts|^\/Sprites|^\/tiers|^\/pokemon|^\/ping|^\/replays\/\b/) return next() if req.path.match(/^\/leaderboard/) # add some proper site authentication later instead authenticate req, (body) -> diff --git a/server/index.coffee b/server/index.coffee index 4db9dfe..92d73f4 100644 --- a/server/index.coffee +++ b/server/index.coffee @@ -125,6 +125,8 @@ CLIENT_VERSION = assets.getVersion() species = generations.GenerationJSON[generations.DEFAULT_GENERATION.toUpperCase()].SpeciesData res.json(formes: formes) + app.get '/ping', (req, res) -> + res.json(200, {response: "pong"}) app.get '/pokeuse/json', (req, res) -> user= req.user