internet4000 / explorer-discogs

A work in progress to explore and play Discogs
https://explorer.radio4000.com
2 stars 0 forks source link

Provide a User-Agent string #8

Closed oskarrough closed 6 years ago

oskarrough commented 6 years ago

Your application must provide a User-Agent string that identifies itself

https://www.discogs.com/developers/#page:home,header:home-general-information

4www commented 6 years ago

Trying this but getting Refused to set unsafe header "user-agent".

Seems to be the issue: https://stackoverflow.com/questions/7210507/ajax-post-error-refused-to-set-unsafe-header-connection

Therefore seems that we need to build, and host a proxy to make the requests.

That was also required to hide the application key and scret that we have rn in clear in the repo.

oskarrough commented 6 years ago

Ah, did not know about that. So you can only set User-Agent when the request is made on a server (proxy)? If so, let's make a new issue to create a proxy.

oskarrough commented 6 years ago

https://www.discogs.com/forum/thread/737881#7320150 says it's impossible via client-side. We need server-side proxy.

Perhaps https://github.com/bartve/disconnect

oskarrough commented 6 years ago

Fixed by adding the proxy #21