Change encrypted URL format to /v1/e/{token}/img.{ext}
Add trailing filename to encrypted URLs for better browser compatibility. The filename is ignored by the server but helps browsers identify content type.
This commit is contained in:
@@ -14,7 +14,8 @@ import (
|
||||
"sneak.berlin/go/pixa/internal/imgcache"
|
||||
)
|
||||
|
||||
// HandleImageEnc handles requests to /v1/e/{token} for encrypted image URLs.
|
||||
// HandleImageEnc handles requests to /v1/e/{token}/* for encrypted image URLs.
|
||||
// The trailing path (e.g., /img.jpg) is ignored but helps browsers identify the content type.
|
||||
func (s *Handlers) HandleImageEnc() http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
|
||||
Reference in New Issue
Block a user