feat: Phase 4 – Modul-Gateway mit dynamischem Routing und Startup-Recovery
This commit is contained in:
@@ -71,6 +71,22 @@ http {
|
||||
proxy_read_timeout 30s;
|
||||
}
|
||||
|
||||
# Modul-Routing (Phase 4): /slug/* wird intern an den
|
||||
# Modul-Gateway des Backends übergeben (/api/v1/gateway/slug/*).
|
||||
# Der Gateway prüft Session, Modul-Status und Berechtigung,
|
||||
# bevor der Request an den Modul-Prozess proxied wird.
|
||||
# WICHTIG: Plattform-Pfade (api, assets, login, …) sind ausgeschlossen,
|
||||
# damit nur echte Modul-Slugs (3–100 Zeichen) weitergeleitet werden.
|
||||
location ~ "^/(?!api/|assets/|login|profile|admin|403|404)(?<module_slug>[a-z0-9][a-z0-9-]{2,100})(?<module_path>/.*)?$" {
|
||||
proxy_pass http://platform_backend/api/v1/gateway/$module_slug$module_path;
|
||||
proxy_http_version 1.1;
|
||||
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 $scheme;
|
||||
proxy_read_timeout 60s;
|
||||
}
|
||||
|
||||
# SPA-Fallback für React Router
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
|
||||
Reference in New Issue
Block a user