Add base kubernetes support 3
This commit is contained in:
@@ -28,10 +28,11 @@ export default defineConfig({
|
||||
},
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: process.env.VITE_API_URL ||
|
||||
(process.env.NODE_ENV === 'development' && process.env.KUBERNETES_SERVICE_HOST
|
||||
? 'http://gateway-service:8000' // Kubernetes internal service
|
||||
: 'http://localhost:8000'), // Local development
|
||||
target: process.env.VITE_API_URL !== undefined
|
||||
? (process.env.VITE_API_URL || '') // Use value or empty string
|
||||
: (process.env.NODE_ENV === 'development' && process.env.KUBERNETES_SERVICE_HOST
|
||||
? 'http://gateway-service:8000' // Kubernetes internal service
|
||||
: 'http://localhost:8000'), // Local development
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/api/, ''),
|
||||
},
|
||||
@@ -51,4 +52,4 @@ export default defineConfig({
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user