Wire up image handler endpoint with service orchestration
- 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
This commit is contained in:
10
internal/imgcache/module.go
Normal file
10
internal/imgcache/module.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package imgcache
|
||||
|
||||
import "time"
|
||||
|
||||
// CacheConfig defaults.
|
||||
const (
|
||||
DefaultCacheTTL = 24 * time.Hour
|
||||
DefaultNegativeTTL = 5 * time.Minute
|
||||
DefaultHotCacheSize = 1000
|
||||
)
|
||||
Reference in New Issue
Block a user