ivandotv / radio-browser-api

Wrapper around free and open-source radio browser API. It simplifies the task of querying the API
https://api.radio-browser.info/
MIT License
48 stars 17 forks source link

Http/Https bug #101

Closed Loveday-Alfred closed 1 month ago

Loveday-Alfred commented 2 years ago

am having this problem with the library...but it seems to work fine on localhost but not on the deployed version. Mixed Content: The page at 'https://naija-radio-stream.netlify.app/' was loaded over HTTPS, but requested an insecure resource 'http://all.api.radio-browser.info/json/servers'. This request has been blocked; the content must be served over HTTPS.

ivandotv commented 2 years ago

That is an upstream issue. API is not served over a secure connection. https://github.com/segler-alex/radiobrowser-api-rust/issues/122

In order to use the API, first, an API endpoint must be determined, that is just how the original creator has implemented the API. https://github.com/ivandotv/radio-browser-api/blob/15cd18383ad06b4f437533e8a302acb17a6169c6/src/radioBrowser.ts#L56-L59

https://github.com/ivandotv/radio-browser-api/blob/15cd18383ad06b4f437533e8a302acb17a6169c6/src/radioBrowser.ts#L516-L520

You can check out the setBaseUrl method and set the base URL manually or you can proxy the request thru a backend server.

IhsenBen commented 1 year ago

anyone up to fix this?