Skip to content

Commit

Permalink
Fix root location
Browse files Browse the repository at this point in the history
  • Loading branch information
BinaryBrain committed Aug 18, 2024
1 parent b3971f1 commit ed4bb04
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/src/axios-common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ console.log(import.meta.env.DEV);
console.log(import.meta.env.VITE_ORBITAL_SERVER_URL);

export const axiosInstance = new Axios({
baseURL: import.meta.env.DEV ? import.meta.env.VITE_ORBITAL_SERVER_URL ?? "" : window.location.href,
baseURL: import.meta.env.DEV ? import.meta.env.VITE_ORBITAL_SERVER_URL ?? "" : window.location.origin,
transformRequest: (data) => JSON.stringify(data),
headers: {
"Content-Type": "application/json",
Expand Down
2 changes: 1 addition & 1 deletion client/src/ws.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const WebSocketHandler = {
}

console.log("Starting connection to WebSocket Server");
const wsUrl = import.meta.env.DEV ? new URL(import.meta.env.SERVER_URL) : new URL(window.location.href);
const wsUrl = import.meta.env.DEV ? new URL(import.meta.env.SERVER_URL) : new URL(window.location.origin);

// const wsProtocol = window.location.protocol === "https:" ? "wss://" : "ws://";
// export const ws = new WebSocket(wsProtocol + location.host + "/");
Expand Down

0 comments on commit ed4bb04

Please sign in to comment.