Skip to content
Snippets Groups Projects
Commit d5be01fc authored by Daniel Gerhardt's avatar Daniel Gerhardt
Browse files

Return apiPath for /configuration-Requests

parent e51bf87d
No related merge requests found
...@@ -20,6 +20,8 @@ package de.thm.arsnova.controller; ...@@ -20,6 +20,8 @@ package de.thm.arsnova.controller;
import java.util.HashMap; import java.util.HashMap;
import javax.servlet.http.HttpServletRequest;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
...@@ -54,8 +56,11 @@ public class ConfigurationController extends AbstractController { ...@@ -54,8 +56,11 @@ public class ConfigurationController extends AbstractController {
@RequestMapping(value = { "/" }, method = RequestMethod.GET) @RequestMapping(value = { "/" }, method = RequestMethod.GET)
@ResponseBody @ResponseBody
public final HashMap<String, String> getConfiguration() { public final HashMap<String, String> getConfiguration(HttpServletRequest request) {
HashMap<String, String> config = new HashMap<String, String>(); HashMap<String, String> config = new HashMap<String, String>();
/* The API path could be unknown to the client in case the request was forwarded */
config.put("apiPath", request.getContextPath());
if (!"".equals(customizationPath)) { if (!"".equals(customizationPath)) {
config.put("customizationPath", customizationPath); config.put("customizationPath", customizationPath);
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment