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:
@@ -56,7 +56,8 @@ func (s *Server) SetupRoutes() {
|
||||
s.router.Head("/v1/image/*", s.h.HandleImage())
|
||||
|
||||
// Encrypted image URL route
|
||||
s.router.Get("/v1/e/{token}", s.h.HandleImageEnc())
|
||||
// The trailing filename (e.g., /img.jpg) is ignored but helps browsers with content type
|
||||
s.router.Get("/v1/e/{token}/*", s.h.HandleImageEnc())
|
||||
|
||||
// Metrics endpoint with auth
|
||||
if s.config.MetricsUsername != "" {
|
||||
|
||||
Reference in New Issue
Block a user