mirror of
https://github.com/nethunterzist/trendyol-analiz
synced 2026-07-03 18:27:04 +00:00
fix: configure sslip.io domains for Coolify Traefik proxy
- Use nullish coalescing (??) in api.js to support empty VITE_API_URL - Set VITE_API_URL to backend's sslip.io Traefik domain - Add sslip.io domains to CORS allowed origins - Update FRONTEND_URL to sslip.io domain Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// API Base URL from environment or default
|
// API Base URL from environment or default
|
||||||
export const API_URL = import.meta.env.VITE_API_URL || 'http://127.0.0.1:8001'
|
export const API_URL = import.meta.env.VITE_API_URL ?? 'http://127.0.0.1:8001'
|
||||||
|
|
||||||
// Timeout configurations (in milliseconds)
|
// Timeout configurations (in milliseconds)
|
||||||
export const TIMEOUT_CONFIG = {
|
export const TIMEOUT_CONFIG = {
|
||||||
|
|||||||
@@ -285,6 +285,9 @@ allowed_origins = [
|
|||||||
# Production server (Coolify)
|
# Production server (Coolify)
|
||||||
"http://194.187.253.230:3010",
|
"http://194.187.253.230:3010",
|
||||||
"http://194.187.253.230",
|
"http://194.187.253.230",
|
||||||
|
# Coolify Traefik proxy (sslip.io)
|
||||||
|
"http://trendyol.194.187.253.230.sslip.io",
|
||||||
|
"http://trendyol-api.194.187.253.230.sslip.io",
|
||||||
]
|
]
|
||||||
|
|
||||||
# Add production domain from environment variable
|
# Add production domain from environment variable
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ services:
|
|||||||
REPORTS_DIR: /data/reports
|
REPORTS_DIR: /data/reports
|
||||||
|
|
||||||
# CORS configuration (allow frontend container)
|
# CORS configuration (allow frontend container)
|
||||||
FRONTEND_URL: http://194.187.253.230:3010
|
FRONTEND_URL: http://trendyol.194.187.253.230.sslip.io
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
# Persistent data volumes
|
# Persistent data volumes
|
||||||
@@ -78,8 +78,8 @@ services:
|
|||||||
context: ./admin-panel
|
context: ./admin-panel
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
args:
|
args:
|
||||||
# Empty = relative URL, nginx proxy handles /api/ routing
|
# Backend API URL via Coolify Traefik proxy
|
||||||
VITE_API_URL: ""
|
VITE_API_URL: http://trendyol-api.194.187.253.230.sslip.io
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
ports:
|
ports:
|
||||||
|
|||||||
Reference in New Issue
Block a user