File tree Expand file tree Collapse file tree 4 files changed +8
-5
lines changed
invokeai/frontend/web/src Expand file tree Collapse file tree 4 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ export const useSocketIO = () => {
4545 const socketOptions = useMemo ( ( ) => {
4646 const options : Partial < ManagerOptions & SocketOptions > = {
4747 timeout : 60000 ,
48- path : '/ ws/socket.io' ,
48+ path : ` ${ window . location . pathname } ws/socket.io` ,
4949 autoConnect : false , // achtung! removing this breaks the dynamic middleware
5050 forceNew : true ,
5151 } ;
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ if (import.meta.env.MODE === 'package') {
3232 fallbackLng : 'en' ,
3333 debug : false ,
3434 backend : {
35- loadPath : ' /locales/{{lng}}.json' ,
35+ loadPath : ` ${ window . location . href . replace ( / \/ $ / , '' ) } /locales/{{lng}}.json` ,
3636 } ,
3737 interpolation : {
3838 escapeValue : false ,
Original file line number Diff line number Diff line change @@ -57,7 +57,9 @@ const dynamicBaseQuery: BaseQueryFn<
5757 const projectId = $projectId . get ( ) ;
5858
5959 const rawBaseQuery = fetchBaseQuery ( {
60- baseUrl : `${ baseUrl ?? '' } /api/v1` ,
60+ baseUrl : baseUrl
61+ ? `${ baseUrl } /api/v1`
62+ : `${ window . location . href . replace ( / \/ $ / , '' ) } /api/v1` ,
6163 prepareHeaders : ( headers ) => {
6264 if ( authToken ) {
6365 headers . set ( 'Authorization' , `Bearer ${ authToken } ` ) ;
Original file line number Diff line number Diff line change @@ -26,8 +26,9 @@ export const receivedOpenAPISchema = createAsyncThunk(
2626 'nodes/receivedOpenAPISchema' ,
2727 async ( _ , { rejectWithValue } ) => {
2828 try {
29- const url = [ window . location . origin , 'openapi.json' ] . join ( '/' ) ;
30- const response = await fetch ( url ) ;
29+ const response = await fetch (
30+ `${ window . location . href . replace ( / \/ $ / , '' ) } /openapi.json`
31+ ) ;
3132 const openAPISchema = await response . json ( ) ;
3233
3334 const schemaJSON = JSON . parse (
You can’t perform that action at this time.
0 commit comments