Fix jwt-token

This commit is contained in:
2025-09-06 15:22:05 +02:00
parent e06c09fbaf
commit 215b06b5c1
9 changed files with 42 additions and 6 deletions

View File

@@ -1,4 +1,5 @@
import axios from 'axios';
import APP_CONFIG from '../config/app';
// Determine API base URL based on environment
const getApiBaseUrl = () => {
@@ -12,8 +13,8 @@ const getApiBaseUrl = () => {
return 'http://localhost:3002/api';
}
// Otherwise, use relative URL (same domain)
return '/drones/api';
// Otherwise, use the configured base path + /api
return `${APP_CONFIG.basePath}/api`;
};
const API_BASE_URL = getApiBaseUrl();