forked from I2P_Developers/i2p.i2p
add X-Frame-Options to console headers
This commit is contained in:
@ -19,6 +19,7 @@ public class CSSHelper extends HelperBase {
|
||||
private static final String FORCE = "classic";
|
||||
public static final String PROP_REFRESH = "routerconsole.summaryRefresh";
|
||||
public static final String DEFAULT_REFRESH = "60";
|
||||
private static final String PROP_XFRAME = "routerconsole.disableXFrame";
|
||||
|
||||
public String getTheme(String userAgent) {
|
||||
String url = BASE_THEME_PATH;
|
||||
@ -58,6 +59,15 @@ public class CSSHelper extends HelperBase {
|
||||
NewsFetcher.getInstance(_context).showNews(val.equals("1"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Should we send X_Frame_Options=SAMEORIGIN
|
||||
* Default true
|
||||
* @since 0.9.1
|
||||
*/
|
||||
public boolean shouldSendXFrame() {
|
||||
return !_context.getBooleanProperty(PROP_XFRAME);
|
||||
}
|
||||
|
||||
/** change refresh and save it */
|
||||
public void setRefresh(String r) {
|
||||
_context.router().saveConfig(PROP_REFRESH, r);
|
||||
|
Reference in New Issue
Block a user