From a6f6392e409eec2d370705ee87b508064e77088b Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Wed, 15 Jun 2016 16:12:19 +0100 Subject: [PATCH] add route to serve files from top level of per user containers --- services/clsi/app.coffee | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/clsi/app.coffee b/services/clsi/app.coffee index 6a8d73fe1c..fb3224e59d 100644 --- a/services/clsi/app.coffee +++ b/services/clsi/app.coffee @@ -96,6 +96,11 @@ app.get "/project/:project_id/build/:build_id/output/*", (req, res, next) -> req.url = "/#{req.params.project_id}/" + OutputCacheManager.path(req.params.build_id, "/#{req.params[0]}") staticServer(req, res, next) +app.get "/project/:project_id/user/:user_id/output/*", (req, res, next) -> + # for specific user get the path to the top level file + req.url = "/#{req.params.project_id}-#{req.params.user_id}/#{req.params[0]}" + staticServer(req, res, next) + app.get "/project/:project_id/output/*", (req, res, next) -> if req.query?.build? && req.query.build.match(OutputCacheManager.BUILD_REGEX) # for specific build get the path from the OutputCacheManager (e.g. .clsi/buildId)