mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 20:34:18 +01:00
fix: remove hardcoded port, require VITE_API_URL env var
- Remove default localhost:8080 fallback from API_BASE_URL - Make VITE_API_URL required for proper functionality - Update .env.example to clarify required configuration - Ensure no hardcoded ports exist in frontend
This commit is contained in:
1 parent
1555a6d641
commit
ecaf1609c3
3 files changed
+4
-9
No files matched your search
+2
-2
@@ -44,9 +44,9 @@ MAX_UPLOAD_SIZE_MB=50
|
||||
DEBUG=false
|
||||
|
||||
# ============================================
|
||||
# Frontend Configuration (for development)
|
||||
# Frontend Configuration (REQUIRED)
|
||||
# ============================================
|
||||
# Backend API URL - frontend connects to this
|
||||
# Note: In development, Vite proxies /api requests to the backend
|
||||
# Must include full URL with port (e.g., http://localhost:8080)
|
||||
VITE_API_URL=http://localhost:8080
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export const API_BASE_URL = import.meta.env.VITE_API_URL || 'http://localhost:8080'
|
||||
export const API_BASE_URL = import.meta.env.VITE_API_URL
|
||||
|
||||
export const OPENCODE_API_ENDPOINT = import.meta.env.VITE_API_URL
|
||||
? `${import.meta.env.VITE_API_URL}/api/opencode`
|
||||
|
||||
@@ -22,12 +22,7 @@ export default defineConfig({
|
||||
target: process.env.VITE_API_URL,
|
||||
changeOrigin: true,
|
||||
},
|
||||
} : {
|
||||
'/api': {
|
||||
target: 'http://localhost:8080',
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
} : undefined,
|
||||
},
|
||||
build: {
|
||||
assetsInlineLimit: 4096,
|
||||
|
||||
Reference in new issue
Block a user