diff --git a/CHANGELOG b/CHANGELOG index 5579d75f..7e7290fc 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,5 @@ v 2.0.2 + - context path is now configurable in config.yml (see app.contextPath in config.yml.example) - fix login on firefox when fields are autofilled by the browser - user is now logged in after registration - fix link to documentation on home page and about page diff --git a/config.dev.yml b/config.dev.yml index b5b355be..273646fb 100644 --- a/config.dev.yml +++ b/config.dev.yml @@ -1,6 +1,9 @@ # CommaFeed settings # ------------------ app: + # context path of the application + contextPath: / + # url used to access commafeed publicUrl: http://localhost:8082/ diff --git a/config.yml.example b/config.yml.example index a8c042a5..332c157f 100644 --- a/config.yml.example +++ b/config.yml.example @@ -1,6 +1,9 @@ # CommaFeed settings # ------------------ app: + # context path of the application + contextPath: / + # url used to access commafeed publicUrl: http://localhost:8082/ diff --git a/src/main/java/com/commafeed/CommaFeedApplication.java b/src/main/java/com/commafeed/CommaFeedApplication.java index dd152468..8c5c8006 100644 --- a/src/main/java/com/commafeed/CommaFeedApplication.java +++ b/src/main/java/com/commafeed/CommaFeedApplication.java @@ -130,6 +130,8 @@ public class CommaFeedApplication extends Application { @Override public void run(CommaFeedConfiguration config, Environment environment) throws Exception { + environment.getApplicationContext().setContextPath(config.getApplicationSettings().getContextPath()); + MetricRegistry metrics = environment.metrics(); SessionFactory sessionFactory = hibernateBundle.getSessionFactory(); diff --git a/src/main/java/com/commafeed/CommaFeedConfiguration.java b/src/main/java/com/commafeed/CommaFeedConfiguration.java index bf5273de..386fd33d 100644 --- a/src/main/java/com/commafeed/CommaFeedConfiguration.java +++ b/src/main/java/com/commafeed/CommaFeedConfiguration.java @@ -33,6 +33,9 @@ public class CommaFeedConfiguration extends Configuration { @Getter public static class ApplicationSettings { + @JsonProperty + private String contextPath; + @JsonProperty private String publicUrl;