Open aldenquimby opened 1 month ago
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.
Thanks @connorlindsey , I'll give it a shot!
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 again