MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / newSignatureError

Function newSignatureError

security/errors.go:17–26  ·  view source on GitHub ↗
(msg string)

Source from the content-addressed store, hash-verified

15)
16
17func newSignatureError(msg string) error {
18 return SignatureError{errctx.NewTextError(
19 msg,
20 1,
21 errctx.WithStatusCode(http.StatusForbidden),
22 errctx.WithPublicMessage("Forbidden"),
23 errctx.WithShouldReport(false),
24 errctx.WithDocsURL("https://docs.imgproxy.net/usage/signing_url"),
25 )}
26}
27
28func newMalformedSignatureError(ctx context.Context) error {
29 msg := "The signature appears to be a processing option. The signature section should always be present in the URL."

Callers 1

VerifySignatureMethod · 0.85

Calls 5

NewTextErrorFunction · 0.92
WithStatusCodeFunction · 0.92
WithPublicMessageFunction · 0.92
WithShouldReportFunction · 0.92
WithDocsURLFunction · 0.92

Tested by

no test coverage detected