From 841d30463a2dace6b4fdd0375d2b6044bfb8caad Mon Sep 17 00:00:00 2001 From: Finn Date: Sat, 6 Jul 2024 00:54:32 -0700 Subject: [PATCH] add CORS header --- serve.go | 1 + 1 file changed, 1 insertion(+) diff --git a/serve.go b/serve.go index 3d2b380..5c8d030 100644 --- a/serve.go +++ b/serve.go @@ -64,6 +64,7 @@ func (h handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { w.Header().Add("Content-Type", stat.ContentType) w.Header().Add("ETag", stat.ETag) + w.Header().Add("Access-Control-Allow-Origin", "*") n, err := io.Copy(w, object) if err != nil {