From 0faae05bf1ea9a8d3da7349fca6be719a314b82f Mon Sep 17 00:00:00 2001 From: Marcel Duran Date: Sat, 30 Apr 2022 21:57:31 -0700 Subject: [PATCH] Adding TAO headers to expose timing resource info --- internal/imageapi/image.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/imageapi/image.go b/internal/imageapi/image.go index a23a7f9..e4786ef 100644 --- a/internal/imageapi/image.go +++ b/internal/imageapi/image.go @@ -53,6 +53,7 @@ func (a *API) imageHandler(w http.ResponseWriter, r *http.Request) *handler.Erro w.Header().Set("Content-Type", getContentType(p.Extension)) w.Header().Set("Cache-Control", "public, max-age=2592000") // Cache for a month w.Header().Set("Picsum-ID", imageID) + w.Header().Set("Timing-Allow-Origin", "*") // Allow all origins to see timing resources // Return the image w.Write(processedImage)