From 58b15895269c636915082ae2a92aa95d975c7661 Mon Sep 17 00:00:00 2001 From: James McLaughlin Date: Mon, 10 Jun 2024 19:51:05 +0100 Subject: [PATCH] add context path setting to api --- grebi_api/src/main/java/uk/ac/ebi/grebi/GrebiApi.java | 1 + 1 file changed, 1 insertion(+) diff --git a/grebi_api/src/main/java/uk/ac/ebi/grebi/GrebiApi.java b/grebi_api/src/main/java/uk/ac/ebi/grebi/GrebiApi.java index 9891893..9167998 100644 --- a/grebi_api/src/main/java/uk/ac/ebi/grebi/GrebiApi.java +++ b/grebi_api/src/main/java/uk/ac/ebi/grebi/GrebiApi.java @@ -33,6 +33,7 @@ public static void main(String[] args) throws ParseException, org.apache.commons config.bundledPlugins.enableCors(cors -> { cors.addRule(CorsPluginConfig.CorsRule::anyHost); }); + config.router.contextPath = System.getenv("GREBI_CONTEXT_PATH"); }) .get("/api/v1/stats", ctx -> { ctx.contentType("application/json");