DVBProject / DVB-I-Reference-Client

DVB-I Reference Client being developed by Sofia Digital
MIT License
54 stars 23 forks source link

HTTP 301 response code is not followed #84

Closed paulhiggs closed 7 months ago

paulhiggs commented 1 year ago

Many service list providers use HTTP 301 to redirect from a permanent alias URL to an operational URL. The Reference Client should follow the redirection offered by HTTP 301 "Moved Permanently".

paulhiggs commented 1 year ago

301 "Moved Permanently" is often used to redirect http:// to https:// (or vice-versa)

sofia-tsa commented 1 year ago

If the reference app is used over https:// then any service list requests using http:// will not work, even if it is just a redirect to https://

paulhiggs commented 1 year ago

Agreed, but 301 can also be used for http->http or https->https aliasing

paulhiggs commented 1 year ago

Some atricles suggest that the Query $.get() api should follow redirects, but perhaps only 302, 303, 307, 308

sofia-tsa commented 1 year ago

I did a quick test, seems like 301 redirect works but the 301 response needs to have the Access-Control-Allow-* headers set correctly. Also,if the redirect is to a different domain/protocol, then the service list URL needs to handle the preflight OPTIONS-request.

paulhiggs commented 7 months ago

Lets close this - it seems to be related more to webserver configuration of CORS than the DVB-I Reference Client.