feat: Añadir configuración de Nginx para el API de LMS y ajustar las rutas en el frontend de OpenCCB

This commit is contained in:
2026-03-31 12:32:55 -03:00
parent d331381efd
commit 2d2ea216e0
8 changed files with 79 additions and 8 deletions
+8 -1
View File
@@ -26,7 +26,14 @@ const getApiBaseUrl = (defaultPort: string, envVar?: string) => {
};
export const API_BASE_URL = getApiBaseUrl("3001", process.env.NEXT_PUBLIC_CMS_API_URL);
export const LMS_API_BASE_URL = getApiBaseUrl("3002", process.env.NEXT_PUBLIC_LMS_API_URL);
const getLmsBaseUrl = (envVar?: string) => {
if (typeof window !== 'undefined' && window.location.hostname === 'studio.norteamericano.com') {
return `${window.location.protocol}//studio.norteamericano.com/lms-api`;
}
return getApiBaseUrl("3002", envVar);
};
export const LMS_API_BASE_URL = getLmsBaseUrl(process.env.NEXT_PUBLIC_LMS_API_URL);
// Polyfill for crypto.randomUUID() for non-HTTPS contexts
export function generateUUID(): string {