aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--caddytest/caddytest_test.go1
-rw-r--r--modules/caddyhttp/staticerror.go3
2 files changed, 1 insertions, 3 deletions
diff --git a/caddytest/caddytest_test.go b/caddytest/caddytest_test.go
index 937537faa..a9d5da936 100644
--- a/caddytest/caddytest_test.go
+++ b/caddytest/caddytest_test.go
@@ -84,7 +84,6 @@ func TestLoadUnorderedJSON(t *testing.T) {
"servers": {
"s_server": {
"listen": [
- ":9443",
":9080"
],
"routes": [
diff --git a/modules/caddyhttp/staticerror.go b/modules/caddyhttp/staticerror.go
index b6e10ff32..aeb311406 100644
--- a/modules/caddyhttp/staticerror.go
+++ b/modules/caddyhttp/staticerror.go
@@ -105,8 +105,7 @@ func (e StaticError) ServeHTTP(w http.ResponseWriter, r *http.Request, _ Handler
}
statusCode = intVal
}
-
- return Error(statusCode, fmt.Errorf("%s", e.Error))
+ return Error(statusCode, fmt.Errorf("%s", repl.ReplaceKnown(e.Error, "")))
}
// Interface guard