Explorar o código

added no-cache endpoint

Henry Oswald %!s(int64=8) %!d(string=hai) anos
pai
achega
7aaf08da48
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      services/web/app/coffee/router.coffee

+ 4 - 0
services/web/app/coffee/router.coffee

@@ -324,6 +324,10 @@ module.exports = class Router
 				headers: req.headers
 			})
 
+		webRouter.get "/no-cache", (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', (req, res, next) -> throw new Error("Test error")
 		webRouter.get '/oops-mongo', (req, res, next) ->