A community based topic aggregation platform built on atproto
1package routes
2
3import (
4 "github.com/go-chi/chi/v5"
5
6 imageproxyhandlers "Coves/internal/api/handlers/imageproxy"
7)
8
9// RegisterImageProxyRoutes registers image proxy endpoints on the router.
10// The image proxy serves transformed images from AT Protocol PDSes.
11//
12// Route: GET /img/{preset}/plain/{did}/{cid}
13//
14// Parameters:
15// - preset: Image transformation preset (e.g., "avatar", "banner", "content_preview")
16// - did: DID of the user who owns the blob
17// - cid: Content identifier of the blob
18//
19// The endpoint supports ETag-based caching with If-None-Match headers.
20func RegisterImageProxyRoutes(r chi.Router, handler *imageproxyhandlers.Handler) {
21 r.Get("/img/{preset}/plain/{did}/{cid}", handler.HandleImage)
22}