updates
This commit is contained in:
@@ -8,10 +8,15 @@
|
||||
|
||||
// Production: Use relative URLs (nginx proxy)
|
||||
// Development: Use full backend URL
|
||||
// Docker: Use backend service name or port 1086
|
||||
const isProduction = process.env.NODE_ENV === 'production';
|
||||
export const API_BASE_URL = isProduction
|
||||
? '' // Use relative URLs in production (proxied by nginx)
|
||||
: (process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8000');
|
||||
const isDocker = process.env.DOCKER_ENV === 'true';
|
||||
|
||||
export const API_BASE_URL = isDocker
|
||||
? (process.env.NEXT_PUBLIC_API_URL || 'http://backend:1086')
|
||||
: isProduction
|
||||
? '' // Use relative URLs in production (proxied by nginx)
|
||||
: (process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8000');
|
||||
|
||||
export const API_CONFIG = {
|
||||
// Django API Base URL
|
||||
|
||||
Reference in New Issue
Block a user