Fix hardcoded localhost:8000 URLs
Some checks failed
continuous-integration/drone/push Build is failing

- Add backend/utils.py for URL management
- Update serializers to use normalize_file_url()
- Update views to use URL utils from env vars
- Fix frontend components to use NEXT_PUBLIC_API_URL
- Add new env vars: DJANGO_BACKEND_URL, DJANGO_MEDIA_BASE_URL
- Replace all hardcoded localhost:8000 with configurable URLs
This commit is contained in:
2025-11-08 19:25:35 +09:00
parent fb74a4a25d
commit e82f0f8e6f
17 changed files with 1396 additions and 58 deletions

View File

@@ -84,7 +84,7 @@ export default function UserPage({
// Определяем API URL в зависимости от окружения
const API = typeof window !== 'undefined'
? (process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8000') // клиент
? (process.env.NEXT_PUBLIC_API_URL || 'https://links.shareon.kr') // клиент
: 'http://web:8000' // сервер в Docker
console.log('Loading data for user:', usernameValue)