From 604fc006b15d9c3f3e5cedbc232e2b4907147f48 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 15 Sep 2023 12:24:53 +1000 Subject: [PATCH] fix(ui): construct openapi url from window.location.origin --- invokeai/frontend/web/src/services/api/thunks/schema.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/invokeai/frontend/web/src/services/api/thunks/schema.ts b/invokeai/frontend/web/src/services/api/thunks/schema.ts index 7dc0bdc331..c209469e02 100644 --- a/invokeai/frontend/web/src/services/api/thunks/schema.ts +++ b/invokeai/frontend/web/src/services/api/thunks/schema.ts @@ -26,7 +26,8 @@ export const receivedOpenAPISchema = createAsyncThunk( 'nodes/receivedOpenAPISchema', async (_, { rejectWithValue }) => { try { - const response = await fetch(`openapi.json`); + const url = [window.location.origin, 'openapi.json'].join('/'); + const response = await fetch(url); const openAPISchema = await response.json(); const schemaJSON = JSON.parse(