mirror of
https://gitlab.crans.org/nounous/ghostream.git
synced 2025-06-28 04:32:27 +02:00
Ignore stream name case
This commit is contained in:
@ -52,7 +52,7 @@ func viewerHandler(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
host = realHost
|
||||
}
|
||||
host = strings.Replace(host, ".", "-", -1)
|
||||
host = strings.ToLower(strings.Replace(host, ".", "-", -1))
|
||||
if streamID, ok := cfg.MapDomainToStream[host]; ok {
|
||||
// Move home page to /about
|
||||
if path == "about" {
|
||||
@ -97,6 +97,7 @@ func staticHandler() http.Handler {
|
||||
func statisticsHandler(w http.ResponseWriter, r *http.Request) {
|
||||
// Retrieve stream name from URL
|
||||
name := strings.SplitN(strings.Replace(r.URL.Path[7:], "/", "", -1), "@", 2)[0]
|
||||
name = strings.ToLower(name)
|
||||
userCount := 0
|
||||
|
||||
// Clients have a unique generated identifier per session, that expires in 40 seconds.
|
||||
|
Reference in New Issue
Block a user