(imageURL string)
| 50 | } |
| 51 | |
| 52 | func newSourceURLError(imageURL string) error { |
| 53 | return SourceURLError{errctx.NewTextError( |
| 54 | fmt.Sprintf("Source URL is not allowed: %s", imageURL), |
| 55 | 1, |
| 56 | errctx.WithStatusCode(http.StatusNotFound), |
| 57 | errctx.WithPublicMessage("Invalid source URL"), |
| 58 | errctx.WithShouldReport(false), |
| 59 | errctx.WithDocsURL("https://docs.imgproxy.net/configuration/options#IMGPROXY_ALLOWED_SOURCES"), |
| 60 | )} |
| 61 | } |
no test coverage detected