1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-21 13:23:07 +01:00

fix: allows dots inside URLs (not at end) (#4035)

This commit is contained in:
Jérémy Touati
2025-07-13 17:17:13 +00:00
committed by GitHub
parent bcc8506d8c
commit f843635060
3 changed files with 4 additions and 4 deletions

View File

@@ -12,7 +12,7 @@ const (
)
// Standard URL regex pattern to match http/https URLs
var urlRegex = regexp.MustCompile(`(https?:\/\/[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+~#?&//=]*[^.]))`)
var urlRegex = regexp.MustCompile(`(https?://[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}[-a-zA-Z0-9()@:%_+.~#?&/=]*/?(?:[-a-zA-Z0-9@%_+~#?&/=]|\b))`)
// MarkURLs marks URLs in the logEvent message with special markers
func MarkURLs(logEvent *container.LogEvent) bool {