segler-alex / radiobrowser-api-rust

radio-browser API implementation in rust
GNU Affero General Public License v3.0
230 stars 96 forks source link

Not all servers support https #105

Closed dylancom closed 3 years ago

dylancom commented 3 years ago

The JS example: https://api.radio-browser.info/examples/serverlist-browser.js shows how to get all servers and use map to prepend 'https://' in front of the available URL's. There is one URL though: 'v2201904596387414.luckysrv.de' that doesn't support https, which will result in errors when trying to make a GET request.

As a workaround I'm currently filtering out URL's that don't contain 'radio-browser.info'. const endpoints = response.data.filter((x) => x.name.includes("radio-browser.info")).map((x) => "https://" + x.name);

segler-alex commented 3 years ago

i found the problem in the /etc/hosts file of de1.api.radio-browser.info thank you for reporting, it should not happen again now.