refactor: finish whitelist-to-allowlist rename in imgcache
All checks were successful
check / check (push) Successful in 6s

This commit is contained in:
2026-08-07 21:24:31 +07:00
parent d69019b9d1
commit 43b9f1cb59
6 changed files with 37 additions and 37 deletions

View File

@@ -75,7 +75,7 @@ type ImageRequest struct {
Quality int
// FitMode is how to fit the image into requested dimensions
FitMode FitMode
// Signature is the HMAC signature for non-whitelisted hosts
// Signature is the HMAC signature for non-allowlisted hosts
Signature string
// Expires is the signature expiration timestamp
Expires time.Time
@@ -163,10 +163,10 @@ type SignatureValidator interface {
Generate(req *ImageRequest) string
}
// Whitelist checks if a URL is whitelisted (no signature required)
type Whitelist interface {
// IsWhitelisted returns true if the URL doesn't require a signature
IsWhitelisted(u *url.URL) bool
// Allowlist checks if a URL is allowlisted (no signature required)
type Allowlist interface {
// IsAllowlisted returns true if the URL doesn't require a signature
IsAllowlisted(u *url.URL) bool
}
// Storage handles persistent storage of cached content