From f8dce5ce9d100b76653226626553ea7c67655759 Mon Sep 17 00:00:00 2001 From: Carl Kittelberger Date: Mon, 2 Jul 2018 08:30:40 +0200 Subject: [PATCH] Send additional headers to signal Icy meta capability. --- plugins/icecast/output/instance.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/icecast/output/instance.go b/plugins/icecast/output/instance.go index f0fc8bd..a84f440 100644 --- a/plugins/icecast/output/instance.go +++ b/plugins/icecast/output/instance.go @@ -60,6 +60,13 @@ func (instance *pluginInstance) Init() { ctx.Writer.Header().Set("icy-metadata", "1") ctx.Writer.Header().Set("icy-metaint", fmt.Sprintf("%d", metaInt)) } + ctx.Writer.Header().Set("icy-name", "Channel name") // TODO + ctx.Writer.Header().Set("icy-pub", "0") // TODO + ctx.Writer.Header().Set("Server", "Uplink/0.0.0; Icecast 2.4.0 compatible") + ctx.Writer.Header().Set("Cache-Control", "no-cache, no-store") + ctx.Writer.Header().Set("Access-Control-Allow-Origin", "*") + ctx.Writer.Header().Set("Access-Control-Allow-Headers", "Origin, Accept, X-Requested-With, Content-Type") + ctx.Writer.Header().Set("Access-Control-Allow-Methods", "GET, OPTIONS, HEAD") ctx.Writer.WriteHeader(200) w := ctx.Writer