fix(demo): allow AI chat in read-only mode

Whitelists /api/ai/execute in the DemoModeMiddleware so users can
interact with the mock AI assistant while keeping the rest of the
system read-only and hardened.
This commit is contained in:
rcourtman 2025-12-23 18:52:13 +00:00
parent d74eae3a3e
commit 1527e962fe

View file

@ -38,6 +38,8 @@ func DemoModeMiddleware(cfg *config.Config, next http.Handler) http.Handler {
"/api/oidc/login",
"/api/oidc/callback",
"/api/logout",
// Allow AI chat interaction (mocked in backend if key missing)
"/api/ai/execute",
}
for _, path := range authPaths {
if r.URL.Path == path {