fix: Add nginx proxy rules for CMS API routes

- Add studio-api-location.conf to redirect API routes to CMS service (port 3001)
- Routes /auth, /courses, /lessons, etc. now go to CMS instead of frontend
- Mount location config in nginx-proxy vhost.d directory

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
2026-03-27 13:21:44 -03:00
parent de85e82554
commit ff0850b87e
3 changed files with 21 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
# CMS API routes - redirect to CMS service (port 3001)
location ~ ^/(auth|courses|modules|lessons|assets|organization|branding|users|admin|question-bank|test-templates|knowledge-base|api|webhooks|grading|libraries|rubrics|learning-sequences|audit-logs|analytics|cohorts|announcements|submissions|peer-reviews|instructors|token-usage|sam|embeddings|health) {
proxy_pass http://openccb-studio:3001;
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 $origin_proto;
proxy_set_header X-Forwarded-Ssl on;
proxy_set_header Connection "";
proxy_http_version 1.1;
}