diff --git a/pom.xml b/pom.xml index 7f085a5b..e494704c 100644 --- a/pom.xml +++ b/pom.xml @@ -316,6 +316,11 @@ io.dropwizard.metrics metrics-json + + io.dropwizard.modules + dropwizard-web + 1.5.0 + javax.xml.bind diff --git a/src/main/java/com/commafeed/CommaFeedApplication.java b/src/main/java/com/commafeed/CommaFeedApplication.java index 1a90f0a8..fa007cf8 100644 --- a/src/main/java/com/commafeed/CommaFeedApplication.java +++ b/src/main/java/com/commafeed/CommaFeedApplication.java @@ -61,6 +61,8 @@ import io.dropwizard.server.DefaultServerFactory; import io.dropwizard.servlets.CacheBustingFilter; import io.dropwizard.setup.Bootstrap; import io.dropwizard.setup.Environment; +import io.dropwizard.web.WebBundle; +import io.dropwizard.web.conf.WebConfiguration; public class CommaFeedApplication extends Application { @@ -96,6 +98,15 @@ public class CommaFeedApplication extends Application { } }); + bootstrap.addBundle(new WebBundle() { + @Override + public WebConfiguration getWebConfiguration(CommaFeedConfiguration configuration) { + WebConfiguration config = new WebConfiguration(); + config.getFrameOptionsHeaderFactory().setEnabled(true); + return config; + } + }); + bootstrap.addBundle(new AssetsBundle("/assets/", "/", "index.html")); bootstrap.addBundle(new MultiPartBundle()); }