änderung portal seite damit kidsai richtig dargestellt wird

This commit is contained in:
root
2025-06-29 12:36:39 +02:00
parent 05f6571aa8
commit 366e6bf7bd
3 changed files with 28 additions and 6 deletions

View File

@@ -12,7 +12,7 @@ server {
listen 10.0.0.29:443 ssl http2; listen 10.0.0.29:443 ssl http2;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
add_header Content-Security-Policy "default-src 'self'; connect-src 'self'; script-src 'self' https://cdn.jsdelivr.net 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com;" always; add_header Content-Security-Policy "default-src 'self'; connect-src 'self'; script-src 'self' https://cdnjs.cloudflare.com https://cdn.jsdelivr.net 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://cdnjs.cloudflare.com; font-src 'self' https://fonts.gstatic.com https://cdnjs.cloudflare.com; img-src 'self' data:;" always;
# Remove or update unsupported origin trial features. # Remove or update unsupported origin trial features.
# For example, comment out or remove these if not using them: # For example, comment out or remove these if not using them:
@@ -55,16 +55,36 @@ server {
fastcgi_intercept_errors on; fastcgi_intercept_errors on;
} }
# Reverse proxy for API calls. # Reverse proxy for API calls to KidsAI Explorer backend
# If your backend expects the API without the "/api" prefix, use the proxy_pass below. # Proxy all /api/ requests to the Node.js server running on port 3002
location /api/ { location /api/ {
proxy_pass http://127.0.0.1:3000; proxy_pass http://127.0.0.1:3002;
# If your backend requires the /api prefix, change to:
# proxy_pass http://127.0.0.1:3000/api/;
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Proto $scheme;
# Additional headers for better compatibility
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
# Increase timeouts for AI processing
proxy_connect_timeout 300;
proxy_send_timeout 300;
proxy_read_timeout 300;
send_timeout 300;
}
# Serve KidsAI Explorer static files
location /kidsai/ {
alias /var/www/html/kidsai/;
try_files $uri $uri/ /kidsai/index.html;
# Cache static assets
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
expires 1y;
add_header Cache-Control "public, immutable";
}
} }
} }

1
sites-enabled/element.conf Symbolic link
View File

@@ -0,0 +1 @@
/etc/nginx/sites-available/element.conf

1
sites-enabled/matrix.conf Symbolic link
View File

@@ -0,0 +1 @@
/etc/nginx/sites-available/matrix.conf