feat(02-01): gate the public presentation path

- 404 /_presentations before the SPA shell
- serve /prezentacje/{slugHash} only when presentations is active
- rebuild the embedded student app
This commit is contained in:
Jakub Zych
2026-10-06 18:14:24 +02:00
parent 9986df32a4
commit 30df20c48d
30 changed files with 33 additions and 28 deletions

View File

@@ -39,7 +39,7 @@ const defaultAdminPath = "/bmadmin"
// reservedPrefixes are the path prefixes the student app never answers: the
// APIs of the plugins and the public uploads. The admin path is added from
// the configuration.
var reservedPrefixes = []string{"/_user", "/_bm", "/_quizzes", "/api", "/storage"}
var reservedPrefixes = []string{"/_user", "/_bm", "/_quizzes", "/_presentations", "/api", "/storage"}
// errMissingIndex reports a tree without index.html (an unbuilt tree).
var errMissingIndex = errors.New("jz.bm: public/index.html missing; run the frontend build (cd frontend && npm ci && npm run build)")