Enable HTTPS production deployment on Sinbad2 via Apache reverse proxy.

This commit is contained in:
Mireya Cueto Garrido
2026-06-03 10:41:02 +02:00
parent 31be326f2c
commit cccbe15275
22 changed files with 264 additions and 28 deletions
+3 -2
View File
@@ -1,5 +1,6 @@
import Axios from 'axios';
import { API_BASE_URL } from '../config';
import { isLoginPath, toAppPath } from './paths';
const api = Axios.create({
baseURL: API_BASE_URL,
@@ -28,8 +29,8 @@ api.interceptors.response.use(
localStorage.removeItem('user');
// SOLUCIÓN: Solo recargamos y redirigimos si NO estamos ya en /login
if (window.location.pathname !== '/login') {
window.location.href = '/login';
if (!isLoginPath(window.location.pathname)) {
window.location.href = toAppPath('/login');
}
}