@marcel91200 / caddy Mirror · read-only / commits / 95b2863d
Fork 0

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

Mirrored from https://github.com/Slazee/caddy.git

Synced Nov 14, 05:15 UTC

admin: Fix regex for removing @id fields (closes #3187)

Matthew Holt committed Mar 24, 2020 at 10:52 UTC 95b2863df2718722a9addd93ac1e88f4debc5235
1 file changed +1 -1
admin.go
+1 -1
@@ -776,7 +776,7 @@ var (
776 // in the config. It also matches adjacent commas so that syntax
777 // can be preserved no matter where in the object the field appears.
778 // It supports string and most numeric values.
779 -var idRegexp = regexp.MustCompile(`(?m),?\s*"` + idKey + `":\s?(-?[0-9]+(\.[0-9]+)?|(?U)".*")\s*,?`)
779 +var idRegexp = regexp.MustCompile(`(?m),?\s*"` + idKey + `"\s*:\s*(-?[0-9]+(\.[0-9]+)?|(?U)".*")\s*,?`)
780
781 const (
782 rawConfigKey = "config"