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
+41 -2
View File
@@ -15,6 +15,17 @@ location /cms-api/ {
proxy_http_version 1.1;
}
location /lms-api/ {
rewrite ^/lms-api/(.*)$ /$1 break;
proxy_pass http://openccb-experience:3002;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
proxy_set_header Connection "";
proxy_http_version 1.1;
}
# Auth pages like GET /auth/login and GET /auth/register must be served by Next.js (3000),
# while the auth API endpoints (POST /auth/login, POST /auth/register, /auth/me, /auth/sso/*)
# must continue to go to the CMS backend (3001).
@@ -222,8 +233,28 @@ location /grading/ {
proxy_http_version 1.1;
}
location = /question-bank {
proxy_pass http://openccb-studio:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
proxy_set_header Connection "";
proxy_http_version 1.1;
}
location = /question-bank/ {
proxy_pass http://openccb-studio:3000/question-bank;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
proxy_set_header Connection "";
proxy_http_version 1.1;
}
location /question-bank/ {
proxy_pass http://openccb-studio:3001;
proxy_pass http://openccb-studio:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@@ -252,8 +283,16 @@ location = /admin/ {
proxy_http_version 1.1;
}
location = /admin/organizations {
return 302 /admin;
}
location = /admin/organizations/ {
return 302 /admin;
}
location /admin/ {
proxy_pass http://openccb-studio:3001;
proxy_pass http://openccb-studio:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;