Try 30 days of free premium.

HTTPS call gives HTTP urls

markg85 wrote 6 years ago: 1

Hi,

A call like: https://api.tvmaze.com/shows/1/episodebynumber?season=1&number=1 gives:

{"id":1,"url":"http://www.tvmaze.com/episodes/1/under-the-dome-1x01-pilot","name":"Pilot","season":1,"number":1,"airdate":"2013-06-24","airtime":"22:00","airstamp":"2013-06-25T02:00:00+00:00","runtime":60,"image":{"medium":"http://static.tvmaze.com/uploads/images/medium_landscape/1/4388.jpg","original":"http://static.tvmaze.com/uploads/images/original_untouched/1/4388.jpg"},"summary":"<p>When the residents of Chester's Mill find themselves trapped under a massive transparent dome with no way out, they struggle to survive as resources rapidly dwindle and panic quickly escalates.</p>","_links":{"self":{"href":"http://api.tvmaze.com/episodes/1"}}}

All the URL's in this output have valid https counterparts as well. Could this be changed to return the urls based on the request? So if i make an HTTP request i get HTTP urls in the response, if i make an HTTPS request i get HTTPS urls in the response.

Where i use your API this only gives me warnings (http used in https, unsecure bla bla), which in this case can be easily fixed by simply replacing http with https, but it feels a bit nasty.

Cheers,
Mark


gazza911 wrote 6 years ago: 1

Hi Mark,

I've previously spoken to David about this.

Once we reach a certain point of HTTPS usage, it will all be switched over.

For now you will have to replace it.


david wrote 6 years ago: 1

Yeah, I'm aware of this but it's intentional. Making this change would require 200% more memory in our caching architecture as each URL would need a separate cache for HTTP and HTTPS requests. We'll likely switch all the urls over to HTTPS once the majority of requests use HTTPS.

markg85 wrote 6 years ago: 1

Thank you both, that's good to know :)

Try 30 days of free premium.