fix: Update permissions and API routing for CMS integration
This commit is contained in:
+6
-1
@@ -11,7 +11,12 @@
|
||||
"Bash(mkdir *)",
|
||||
"Bash(ssh *)",
|
||||
"Bash(git fetch *)",
|
||||
"Bash(git add *)"
|
||||
"Bash(git add *)",
|
||||
"Bash(git commit *)",
|
||||
"Bash(git push *)",
|
||||
"Bash(scp *)",
|
||||
"Bash(curl *)",
|
||||
"Bash(sudo *)"
|
||||
]
|
||||
},
|
||||
"$version": 3
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"permissions": {
|
||||
"allow": [
|
||||
"Bash(rm *)",
|
||||
"Bash(sed *)",
|
||||
"Bash(ls *)",
|
||||
"Bash(true)",
|
||||
"Bash(cargo check *)",
|
||||
"Bash(cargo build *)",
|
||||
"Bash(chmod *)",
|
||||
"Bash(mkdir *)"
|
||||
]
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -19,7 +19,7 @@ services:
|
||||
- vhost:/etc/nginx/vhost.d
|
||||
- html:/usr/share/nginx/html
|
||||
- ./nginx/proxy.conf:/etc/nginx/conf.d/proxy.conf:ro
|
||||
- ./nginx/studio-api-location.conf:/etc/nginx/vhost.d/studio.norteamericano.com_location:ro
|
||||
- ./nginx/studio.norteamericano.com:/etc/nginx/vhost.d/studio.norteamericano.com:ro
|
||||
restart: always
|
||||
networks:
|
||||
- openccb-network
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
# CMS API routes - redirect to CMS service (port 3001)
|
||||
# This file is included at the server level for studio.norteamericano.com
|
||||
|
||||
# Handle CMS API routes before the main location block
|
||||
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_pass http://172.18.0.6: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;
|
||||
|
||||
@@ -17,6 +17,11 @@ const nextConfig = {
|
||||
port: '3001',
|
||||
pathname: '/assets/**',
|
||||
},
|
||||
{
|
||||
protocol: 'https',
|
||||
hostname: 'studio.norteamericano.com',
|
||||
pathname: '/assets/**',
|
||||
},
|
||||
],
|
||||
},
|
||||
async rewrites() {
|
||||
@@ -25,6 +30,119 @@ const nextConfig = {
|
||||
source: '/assets/:path*',
|
||||
destination: 'http://localhost:3001/assets/:path*',
|
||||
},
|
||||
// Proxy API routes to CMS service
|
||||
{
|
||||
source: '/auth/:path*',
|
||||
destination: 'http://localhost:3001/auth/:path*',
|
||||
},
|
||||
{
|
||||
source: '/courses/:path*',
|
||||
destination: 'http://localhost:3001/courses/:path*',
|
||||
},
|
||||
{
|
||||
source: '/modules/:path*',
|
||||
destination: 'http://localhost:3001/modules/:path*',
|
||||
},
|
||||
{
|
||||
source: '/lessons/:path*',
|
||||
destination: 'http://localhost:3001/lessons/:path*',
|
||||
},
|
||||
{
|
||||
source: '/organization/:path*',
|
||||
destination: 'http://localhost:3001/organization/:path*',
|
||||
},
|
||||
{
|
||||
source: '/branding/:path*',
|
||||
destination: 'http://localhost:3001/branding/:path*',
|
||||
},
|
||||
{
|
||||
source: '/users/:path*',
|
||||
destination: 'http://localhost:3001/users/:path*',
|
||||
},
|
||||
{
|
||||
source: '/admin/:path*',
|
||||
destination: 'http://localhost:3001/admin/:path*',
|
||||
},
|
||||
{
|
||||
source: '/question-bank/:path*',
|
||||
destination: 'http://localhost:3001/question-bank/:path*',
|
||||
},
|
||||
{
|
||||
source: '/test-templates/:path*',
|
||||
destination: 'http://localhost:3001/test-templates/:path*',
|
||||
},
|
||||
{
|
||||
source: '/knowledge-base/:path*',
|
||||
destination: 'http://localhost:3001/knowledge-base/:path*',
|
||||
},
|
||||
{
|
||||
source: '/api/:path*',
|
||||
destination: 'http://localhost:3001/api/:path*',
|
||||
},
|
||||
{
|
||||
source: '/webhooks/:path*',
|
||||
destination: 'http://localhost:3001/webhooks/:path*',
|
||||
},
|
||||
{
|
||||
source: '/grading/:path*',
|
||||
destination: 'http://localhost:3001/grading/:path*',
|
||||
},
|
||||
{
|
||||
source: '/libraries/:path*',
|
||||
destination: 'http://localhost:3001/libraries/:path*',
|
||||
},
|
||||
{
|
||||
source: '/rubrics/:path*',
|
||||
destination: 'http://localhost:3001/rubrics/:path*',
|
||||
},
|
||||
{
|
||||
source: '/learning-sequences/:path*',
|
||||
destination: 'http://localhost:3001/learning-sequences/:path*',
|
||||
},
|
||||
{
|
||||
source: '/audit-logs/:path*',
|
||||
destination: 'http://localhost:3001/audit-logs/:path*',
|
||||
},
|
||||
{
|
||||
source: '/analytics/:path*',
|
||||
destination: 'http://localhost:3001/analytics/:path*',
|
||||
},
|
||||
{
|
||||
source: '/cohorts/:path*',
|
||||
destination: 'http://localhost:3001/cohorts/:path*',
|
||||
},
|
||||
{
|
||||
source: '/announcements/:path*',
|
||||
destination: 'http://localhost:3001/announcements/:path*',
|
||||
},
|
||||
{
|
||||
source: '/submissions/:path*',
|
||||
destination: 'http://localhost:3001/submissions/:path*',
|
||||
},
|
||||
{
|
||||
source: '/peer-reviews/:path*',
|
||||
destination: 'http://localhost:3001/peer-reviews/:path*',
|
||||
},
|
||||
{
|
||||
source: '/instructors/:path*',
|
||||
destination: 'http://localhost:3001/instructors/:path*',
|
||||
},
|
||||
{
|
||||
source: '/token-usage/:path*',
|
||||
destination: 'http://localhost:3001/token-usage/:path*',
|
||||
},
|
||||
{
|
||||
source: '/sam/:path*',
|
||||
destination: 'http://localhost:3001/sam/:path*',
|
||||
},
|
||||
{
|
||||
source: '/embeddings/:path*',
|
||||
destination: 'http://localhost:3001/embeddings/:path*',
|
||||
},
|
||||
{
|
||||
source: '/health',
|
||||
destination: 'http://localhost:3001/health',
|
||||
},
|
||||
];
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user