feat: Añadir lógica condicional para la URL de la API CMS y mejorar la configuración de Nginx

This commit is contained in:
2026-03-31 12:55:12 -03:00
parent 2d2ea216e0
commit 212832fdda
2 changed files with 17 additions and 1 deletions
+6 -1
View File
@@ -16,7 +16,12 @@ export const getLmsApiUrl = () => {
}
return getApiBaseUrl("3002", process.env.NEXT_PUBLIC_LMS_API_URL);
};
export const getCmsApiUrl = () => getApiBaseUrl("3001", process.env.NEXT_PUBLIC_CMS_API_URL);
export const getCmsApiUrl = () => {
if (typeof window !== 'undefined' && window.location.hostname === 'learning.norteamericano.com') {
return `${window.location.protocol}//learning.norteamericano.com/cms-api`;
}
return getApiBaseUrl("3001", process.env.NEXT_PUBLIC_CMS_API_URL);
};
export const getImageUrl = (path?: string) => {
if (!path) return '';