You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
but you can also add your own, which we've leveraged to solve this exact same problem with Algolia in our app
their lib has a lot more complexity (read-only vs write-only hosts, caching host status in local storage, etc) than what we'd need here
Implementation Ideas
it looks like this logic could be entirely contained to ApiClient
in the catch of makeRequest (so after 3 failures), if there are multiple hosts, we could re-create axiosClient and socket using the next host in the list, and then try again
I'd be glad to try a PR with this if it sounds ok
The text was updated successfully, but these errors were encountered:
Hey @aldenquimby, thanks for the detailed issue! This would definitely be a nice improvement to the api client but not something we can immediately tackle. If you'd be willing to open a PR, that would be amazing! One note is that we'd prefer to update the host param to accept a string or array rather than introduce an additional property.
Background
api.knock.com
gets blocked, so Knock does not workReverse Proxy
KnockOption.host
let's us work around this, which is greatmysite.com/tunnel/knock
as a reverse proxy toapi.knock.com
, and now the firewall blocks are goneAsk
Implementation Ideas
ApiClient
catch
ofmakeRequest
(so after 3 failures), if there are multiple hosts, we could re-createaxiosClient
andsocket
using the next host in the list, and then try againThe text was updated successfully, but these errors were encountered: