Like the title says, I am trying to redirect https traffic to rtsp locations. I am filtering by user-agent as the platform I am trying to work with has clients that CAN use rtsp and ones that cannot.
For all intents and purposes, the end client knows and can use the Location header.
The problem I am running into is the redirect works over http but not https.
I would appreciate some insight as to why http works and not https, especially since the clients that CANNOT use rtsp also require https.
I have tried as many permutations as I can think of, with a test server written in Go.
s.HandleFunc("GET /proxy", func(w http.ResponseWriter, r *http.Request) { platform := r.Header.Get("User-Agent") log.Println(platform) // This does not work in https, only http if strings.Contains(platform, `NSPlayer`) { log.Println("Windows") http.Redirect(w, r, "rtspt://stream.vrcdn.live/live/monochrome", http.StatusMovedPermanently) return } // This works and has to be https if strings.Contains(platform, `AVProMobileVideo`) || strings.Contains(platform, `stagefright`) { log.Println("Quest/Android") http.Redirect(w, r, "https://stream.vrcdn.live/live/monochrome.live.ts", http.StatusMovedPermanently) return } //log.Println("Other/Web") //http.Redirect(w, r, "https://monogo.monovrc.com/proxy", http.StatusMovedPermanently) })