diff --git a/docs/ghostream.example.yml b/docs/ghostream.example.yml index 4856b96..f583472 100644 --- a/docs/ghostream.example.yml +++ b/docs/ghostream.example.yml @@ -119,9 +119,10 @@ web: # e.g., on http://stream.example.com:8080/, if the domain stream.example.com is mapped to "example", # the stream served will be "example". # This implies that your domain will be able to serve only one stream. + # Dots in the domain name must be remplaced by underscores to avoid yaml issues. # #mapDomainToStream: - # stream.example.com: example + # stream_example_com: example # Stream player poster # Shown when stream is loading or inactive. diff --git a/web/handler.go b/web/handler.go index 9549032..cf3a04d 100644 --- a/web/handler.go +++ b/web/handler.go @@ -32,6 +32,7 @@ func viewerPostHandler(w http.ResponseWriter, r *http.Request) { return } host = realHost + host = strings.Replace(host, ".", "_", -1) } if streamID, ok := cfg.MapDomainToStream[host]; ok { path = streamID @@ -81,6 +82,7 @@ func viewerGetHandler(w http.ResponseWriter, r *http.Request) { return } host = realHost + host = strings.Replace(host, ".", "_", -1) } if streamID, ok := cfg.MapDomainToStream[host]; ok { if path == "about" {