diff options
author | Mohammed Al Sahaf <[email protected]> | 2024-08-22 20:32:44 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2024-08-22 11:32:44 -0600 |
commit | 8af646730be93f4a00b873d1822bfde6be106696 (patch) | |
tree | add698585ffed4b62d8daed1ecd77d261880afc8 /modules | |
parent | 098897bdea67eb31634f440a4d9a69b5753a9ac3 (diff) | |
download | caddy-8af646730be93f4a00b873d1822bfde6be106696.tar.gz caddy-8af646730be93f4a00b873d1822bfde6be106696.zip |
caddyhttp: run `error` (msg) through replacer (#6536)
* error: run `error` (msg) through replacer
Signed-off-by: Mohammed Al Sahaf <[email protected]>
* fix integration test
Signed-off-by: Mohammed Al Sahaf <[email protected]>
---------
Signed-off-by: Mohammed Al Sahaf <[email protected]>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/caddyhttp/staticerror.go | 3 |
1 files changed, 1 insertions, 2 deletions
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 |