Add CORS header

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2021-11-14 16:19:36 +01:00
parent 246288d7aa
commit 78b633b95b
Signed by: luzifer
GPG Key ID: 0066F03ED215AD7D

View File

@ -113,6 +113,7 @@ func handleTTS(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "audio/ogg")
w.Header().Set("Cache-Control", "public, max-age=86400, immutable")
w.Header().Set("Access-Control-Allow-Origin", "*")
w.Write(resp.AudioContent)
}