diff --git a/webui/package.json b/webui/package.json index c149d4e..736934d 100644 --- a/webui/package.json +++ b/webui/package.json @@ -63,5 +63,6 @@ "babel-plugin-relay": "^14.1.0", "graphql": "^16.3.0", "relay-compiler": "^13.2.0" - } + }, + "proxy": "http://localhost:8123" } diff --git a/webui/src/app/fetchGraphQL.ts b/webui/src/app/fetchGraphQL.ts index 2a7a81a..ea8a09a 100644 --- a/webui/src/app/fetchGraphQL.ts +++ b/webui/src/app/fetchGraphQL.ts @@ -13,7 +13,7 @@ async function fetchGraphQL(auth: GQLAuthObj, text: any, variables: any) { headers["Authorization"] = `Bearer ${auth.auth}` } - const response = await fetch('http://127.0.0.1:8123/api/query', { + const response = await fetch('/api/query', { method: 'POST', headers: headers, body: JSON.stringify({