refactor: finish whitelist-to-allowlist rename in imgcache
All checks were successful
check / check (push) Successful in 6s
All checks were successful
check / check (push) Successful in 6s
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user