mistval / unofficial-jisho-api

Encapsulates the official Jisho.org API and also provides kanji, example, and stroke diagram search.
MIT License
139 stars 14 forks source link

Enable Option for CORS #48

Closed Doderich closed 1 year ago

Doderich commented 1 year ago

It would be a good idea to create a option to add a url of a CORS reverse proxy server infront of the jisho url. That would enable this api to also work on browser-side applications.

mistval commented 1 year ago

Hi, you could use the parsing functions discussed in the README under Parsing HTML strings to implement something like this.

I don't feel it would be appropriate to add direct CORS proxy support to this library since the Jisho admins may have reasons for leaving CORS disabled.