diff --git a/src/rpc/server.ts b/src/rpc/server.ts index e3c518efb..a0d09f2ba 100644 --- a/src/rpc/server.ts +++ b/src/rpc/server.ts @@ -75,7 +75,7 @@ export class Server { constructor(serverURL: string, opts: Server.Options = {}) { this.serverURL = URI(serverURL); - if (opts.headers && Object.keys(opts.headers).length === 0) { + if (opts.headers && Object.keys(opts.headers).length !== 0) { AxiosClient.interceptors.request.use((config: any) => { // merge the custom headers into any existing headers config.headers = Object.assign(config.headers, opts.headers);