Skip to content

Commit 2890e03

Browse files
authored
Merge pull request #201 from Larmyliu/feat/proxyServerUrl
Update Vite configuration to enable host access and use `window.location.hostname` for Inspector URL
2 parents 008204f + 51f3135 commit 2890e03

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
@@ -48,7 +48,7 @@ import ToolsTab from "./components/ToolsTab";
4848

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

5353
const App = () => {
5454
// 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)