Skip to content

Commit 4fdbcee

Browse files
author
jazminliu
committed
Update Vite configuration to enable host access and fix proxy server URL to use the current hostname.
1 parent cedf02d commit 4fdbcee

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

client/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ import ToolsTab from "./components/ToolsTab";
4747

4848
const params = new URLSearchParams(window.location.search);
4949
const PROXY_PORT = params.get("proxyPort") ?? "3000";
50-
const PROXY_SERVER_URL = `http://localhost:${PROXY_PORT}`;
50+
const PROXY_SERVER_URL = `http://${window.location.hostname}:${PROXY_PORT}`;
5151

5252
const App = () => {
5353
// Handle OAuth callback route

client/vite.config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ import { defineConfig } from "vite";
55
// https://vitejs.dev/config/
66
export default defineConfig({
77
plugins: [react()],
8-
server: {},
8+
server: {
9+
host: true,
10+
},
911
resolve: {
1012
alias: {
1113
"@": path.resolve(__dirname, "./src"),

0 commit comments

Comments
 (0)