diff --git a/frontend/.env.example b/frontend/.env.example index 86b0ad3..b1a0534 100644 --- a/frontend/.env.example +++ b/frontend/.env.example @@ -1 +1 @@ -VITE_BACKEND_BASE_URL=http://127.0.0.1:14620 +VITE_BACKEND_BASE_URL=https://mcbc.rc707blog.top diff --git a/frontend/src/api/backendApi.js b/frontend/src/api/backendApi.js index 0ea30b7..3c486e3 100644 --- a/frontend/src/api/backendApi.js +++ b/frontend/src/api/backendApi.js @@ -1,4 +1,5 @@ -const API_BASE_URL = import.meta.env.VITE_BACKEND_BASE_URL || "http://127.0.0.1:14620"; +const API_BASE_URL = + import.meta.env.VITE_BACKEND_BASE_URL || "https://mcbc.rc707blog.top"; async function request(path, options = {}) { const response = await fetch(`${API_BASE_URL}${path}`, options); diff --git a/frontend/vite.config.js b/frontend/vite.config.js index 0c59831..105f286 100644 --- a/frontend/vite.config.js +++ b/frontend/vite.config.js @@ -7,4 +7,9 @@ export default defineConfig({ server: { port: 14621, }, + preview: { + host: "0.0.0.0", + port: 14621, + allowedHosts: ["mc.rc707blog.top"], + }, })