fix: Default to a relative path for the admin backend URL (#9947)

This commit is contained in:
Stevche Radevski
2024-11-06 15:08:38 +01:00
committed by GitHub
parent 4f4b0ddda2
commit b3cbc160eb
7 changed files with 19 additions and 11 deletions
@@ -1,6 +1,6 @@
import Medusa from "@medusajs/js-sdk"
export const backendUrl = __BACKEND_URL__ ?? "http://localhost:9000"
export const backendUrl = __BACKEND_URL__ ?? "/"
export const sdk = new Medusa({
baseUrl: backendUrl,
@@ -1,6 +1,6 @@
import { QueryClient } from "@tanstack/react-query"
export const MEDUSA_BACKEND_URL = __BACKEND_URL__ ?? "http://localhost:9000"
export const MEDUSA_BACKEND_URL = __BACKEND_URL__ ?? "/"
export const queryClient = new QueryClient({
defaultOptions: {