mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
send X-Frame-Options header with value "DENY"
This commit is contained in:
@@ -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<CommaFeedConfiguration> {
|
||||
|
||||
@@ -96,6 +98,15 @@ public class CommaFeedApplication extends Application<CommaFeedConfiguration> {
|
||||
}
|
||||
});
|
||||
|
||||
bootstrap.addBundle(new WebBundle<CommaFeedConfiguration>() {
|
||||
@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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user