Skip to content

Commit

Permalink
add selftUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
cfaur09 committed Feb 6, 2025
1 parent 829cb6c commit ec8f3e5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/common/graphql/graphql.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { ApiConfigService } from "../api-config/api.config.service";
import { GraphQLClient } from 'graphql-request';
import { OriginLogger } from "@multiversx/sdk-nestjs-common";
import fetch, { RequestInit } from 'node-fetch';
import { ContextTracker } from "@multiversx/sdk-nestjs-common";

@Injectable()
export class GraphQlService {
Expand All @@ -15,11 +14,10 @@ export class GraphQlService {

async getExchangeServiceData(query: string, variables?: any): Promise<any> {
const exchangeServiceUrl = this.apiConfigService.getExchangeServiceUrlMandatory();
const origin = ContextTracker.get()?.origin ?? 'Unknown';
const graphqlClient = new GraphQLClient(exchangeServiceUrl, {
fetch: this.createFetchWithTimeout(60_000),
headers: {
'x-request-origin': origin,
'origin': this.apiConfigService.getSelfUrl(),
},
});

Expand Down

0 comments on commit ec8f3e5

Please sign in to comment.