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
If you create two instances of a Server (regardless of whether it's for rpc or Horizon) and pass custom headers, the second instance of the server will still have the first instance's custom headers.
invoking someMethod will send both Custom-A and Custom-B headers.
Why
This is occurring because the AxiosClient variable is global shared across all Server instances which inject an interceptor to use the custom headers, so the interceptors are additive.
Known Workarounds
You can refresh the page to get a new AxiosClient instance created and the first construction of a Server will work as intended. You may also be able to work around this by using the noaxios bundle.
The text was updated successfully, but these errors were encountered:
What
If you create two instances of a
Server
(regardless of whether it's forrpc
orHorizon
) and pass custom headers, the second instance of the server will still have the first instance's custom headers.In other words,
invoking
someMethod
will send bothCustom-A
andCustom-B
headers.Why
This is occurring because the
AxiosClient
variable is global shared across allServer
instances which inject aninterceptor
to use the custom headers, so the interceptors are additive.Known Workarounds
You can refresh the page to get a new
AxiosClient
instance created and the first construction of aServer
will work as intended. You may also be able to work around this by using thenoaxios
bundle.The text was updated successfully, but these errors were encountered: