- Add image proxy config options (signing_key, whitelist_hosts, allow_http) - Create Service to orchestrate cache, fetcher, and processor - Initialize image service in handlers OnStart hook - Implement HandleImage with URL parsing, signature validation, cache - Implement HandleRobotsTxt for search engine prevention - Parse query params for signature, quality, and fit mode
11 lines
173 B
Go
11 lines
173 B
Go
package imgcache
|
|
|
|
import "time"
|
|
|
|
// CacheConfig defaults.
|
|
const (
|
|
DefaultCacheTTL = 24 * time.Hour
|
|
DefaultNegativeTTL = 5 * time.Minute
|
|
DefaultHotCacheSize = 1000
|
|
)
|