This commit is contained in:
eson
2023-11-24 16:38:11 +08:00
parent 81df0950e3
commit b52f8c3849
3 changed files with 4 additions and 4 deletions

View File

@@ -30,7 +30,7 @@ func main() {
mux := runtime.NewServeMux(
runtime.WithErrorHandler(func(ctx context.Context, sm *runtime.ServeMux, m runtime.Marshaler, w http.ResponseWriter, r *http.Request, err error) {
log.Println(err)
w.Write([]byte("\n" + err.Error()))
w.Write([]byte("gateway: " + err.Error()))
}),
runtime.WithMetadata(logic.PassMetadata),
runtime.WithForwardResponseOption(logic.ResponseHeaderMatcher),