mirror of
https://github.com/Luzifer/webtts.git
synced 2024-12-22 19:41:20 +00:00
Add CORS header
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
246288d7aa
commit
78b633b95b
1 changed files with 1 additions and 0 deletions
1
main.go
1
main.go
|
@ -113,6 +113,7 @@ func handleTTS(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
w.Header().Set("Content-Type", "audio/ogg")
|
w.Header().Set("Content-Type", "audio/ogg")
|
||||||
w.Header().Set("Cache-Control", "public, max-age=86400, immutable")
|
w.Header().Set("Cache-Control", "public, max-age=86400, immutable")
|
||||||
|
w.Header().Set("Access-Control-Allow-Origin", "*")
|
||||||
w.Write(resp.AudioContent)
|
w.Write(resp.AudioContent)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue