|
@@ -5,6 +5,7 @@ import (
|
|
|
"errors"
|
|
|
"fmt"
|
|
|
"net/http"
|
|
|
+ "net/url"
|
|
|
"slices"
|
|
|
"strconv"
|
|
|
"strings"
|
|
@@ -251,6 +252,10 @@ func handleProcessing(reqID string, rw http.ResponseWriter, r *http.Request) {
|
|
|
metrics.SetMetadata(ctx, "imgproxy.source_image_url", imageURL)
|
|
|
metrics.SetMetadata(ctx, "imgproxy.processing_options", po)
|
|
|
|
|
|
+ if u, ue := url.Parse(imageURL); ue == nil {
|
|
|
+ metrics.SetMetadata(ctx, "imgproxy.source_image_origin", u.Scheme+"://"+u.Host)
|
|
|
+ }
|
|
|
+
|
|
|
err = security.VerifySourceURL(imageURL)
|
|
|
checkErr(ctx, "security", err)
|
|
|
|