Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1486

What is the proper way to redirect https to other protocols like rtsp?

$
0
0

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)    })

Viewing all articles
Browse latest Browse all 1486

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>