Commit 161ecc05 authored by Brian Clozel's avatar Brian Clozel

Bind server.error.whitelabel.enabled to ErrorProperties

Closes gh-12516
parent 2da4897a
/*
* Copyright 2012-2017 the original author or authors.
* Copyright 2012-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -44,6 +44,8 @@ public class ErrorProperties {
*/
private IncludeStacktrace includeStacktrace = IncludeStacktrace.NEVER;
private Whitelabel whitelabel = new Whitelabel();
public String getPath() {
return this.path;
}
......@@ -68,6 +70,14 @@ public class ErrorProperties {
this.includeStacktrace = includeStacktrace;
}
public Whitelabel getWhitelabel() {
return this.whitelabel;
}
public void setWhitelabel(Whitelabel whitelabel) {
this.whitelabel = whitelabel;
}
/**
* Include Stacktrace attribute options.
*/
......@@ -90,4 +100,20 @@ public class ErrorProperties {
}
public static class Whitelabel {
/**
* Whether to enable the default error page displayed in browsers in case of a server error.
*/
private boolean enabled = true;
public boolean isEnabled() {
return this.enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
}
}
......@@ -29,16 +29,6 @@
"level": "error"
}
},
{
"name": "server.error.include-stacktrace",
"defaultValue": "never"
},
{
"name": "server.error.whitelabel.enabled",
"type": "java.lang.Boolean",
"description": "Whether to enable the default error page displayed in browsers in case of a server error.",
"defaultValue": true
},
{
"name": "server.port",
"defaultValue": 8080
......
Markdown is supported
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