Skip to content

Commit

Permalink
add custom header to horzon Server
Browse files Browse the repository at this point in the history
  • Loading branch information
celestialkylin committed Jun 12, 2024
1 parent 38ead87 commit 5135243
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/horizon/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ export class Server {
if (opts.authToken) {
customHeaders["X-Auth-Token"] = opts.authToken;
}
if (opts.headers) {
Object.assign(customHeaders, opts.headers);
}
if (Object.keys(customHeaders).length > 0) {
AxiosClient.interceptors.request.use((config) => {
// merge the custom headers with an existing headers, where customs
Expand Down

0 comments on commit 5135243

Please sign in to comment.