prod için Allowed_Host eklendi.
This commit is contained in:
@@ -1 +1,3 @@
|
||||
VITE_API_URL=http://localhost:4000
|
||||
# Prod için izin verilecek host(lar), virgülle ayırabilirsiniz. Örn:
|
||||
# ALLOWED_HOSTS=wisecolt-ci-frontend-ft2pzo-1c0eb3-188-245-185-248.traefik.me
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
import { defineConfig } from "vite";
|
||||
import react from "@vitejs/plugin-react";
|
||||
|
||||
const allowedHosts = process.env.ALLOWED_HOSTS?.split(",").map((h) => h.trim()).filter(Boolean);
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
server: {
|
||||
port: 5173,
|
||||
host: true
|
||||
host: true,
|
||||
...(allowedHosts?.length ? { allowedHosts } : {})
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user