서버 환경에 맞게 config 수정
This commit is contained in:
parent
e4ca0b47fa
commit
0342c96b28
|
|
@ -0,0 +1,11 @@
|
|||
# Dev uses the Vite proxy (see vite.config.js), so these are SAME-ORIGIN relative paths.
|
||||
# The proxy forwards them to the Spring Boot backend, so the browser never makes a
|
||||
# cross-origin request and CORS is avoided entirely in development.
|
||||
VITE_AUTH_SERVICE_URL=/auth-service
|
||||
VITE_OPR_API_URL=/opr-rest-api
|
||||
VITE_CRM_API_URL=/crm-rest-api
|
||||
|
||||
# --- If you ever call the backend DIRECTLY (no proxy), use absolute URLs instead and
|
||||
# --- configure CORS on the backend (allowCredentials=true + explicit origin, never "*"):
|
||||
# VITE_AUTH_SERVICE_URL=http://localhost:8080/auth-service
|
||||
# VITE_OPR_API_URL=http://localhost:8080/opr-service
|
||||
|
|
@ -6,7 +6,6 @@ dist/
|
|||
build/
|
||||
|
||||
# Env and logs
|
||||
.env
|
||||
*.log
|
||||
|
||||
# Editor and system files
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import { defineConfig } from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
|
||||
const AUTH_BACKEND = 'http://localhost:8080' // auth-service
|
||||
const CRM_BACKEND = 'http://localhost:8082' // crm-rest-api
|
||||
const OPR_BACKEND = 'http://localhost:8083' // opr-rest-api
|
||||
const AUTH_BACKEND = 'http://auth-service:8080' // auth-service
|
||||
const CRM_BACKEND = 'http://crm-rest-api:8082' // crm-rest-api
|
||||
const OPR_BACKEND = 'http://opr-rest-api:8083' // opr-rest-api
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig({
|
||||
|
|
|
|||
Loading…
Reference in New Issue