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

fix: removes period at the end of URLs (#4016)

This commit is contained in:
Amir Raminfar
2025-06-30 08:25:08 -07:00
committed by GitHub
parent 500ffa6b5b
commit 0c25f0f82e

View File

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