Add CORS header for development

This commit is contained in:
Rob Watson 2021-09-06 16:24:29 +02:00
parent 5e1b8f6bd4
commit 2a7b1bfc2e
1 changed files with 1 additions and 0 deletions

View File

@ -115,6 +115,7 @@ func handleRequest(w http.ResponseWriter, r *http.Request) {
defer downloader.Close()
w.Header().Add("Content-Type", ContentTypeAudioM4A)
w.Header().Add("Access-Control-Allow-Origin", "*")
w.WriteHeader(http.StatusOK)
n, err := io.Copy(w, downloader)