Go · 836 bytes Raw Blame History
1 // SPDX-License-Identifier: AGPL-3.0-or-later
2
3 package webhook
4
5 // The SSRF defenses originally introduced by S33 were lifted into
6 // `internal/security/ssrf` during S35 so future outbound-fetch paths
7 // (avatar mirroring, OG-image scraping, …) reuse the same machinery.
8 // This file keeps the original webhook-package names as type aliases
9 // so callers don't churn.
10
11 import (
12 "github.com/tenseleyFlow/shithub/internal/security/ssrf"
13 )
14
15 // SSRFConfig is the re-exported alias for ssrf.Config.
16 type SSRFConfig = ssrf.Config
17
18 // SSRFError is the re-exported alias for ssrf.Error.
19 type SSRFError = ssrf.Error
20
21 // DefaultSSRFConfig returns the production defaults.
22 func DefaultSSRFConfig() SSRFConfig { return ssrf.Default() }
23
24 // IsSSRF reports whether err is or wraps an SSRFError.
25 func IsSSRF(err error) bool { return ssrf.Is(err) }
26