Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/Controller/HealthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,15 @@ public function __construct(
* which is a meaningful answer for a monitoring probe: the app is reachable,
* its declarative health engine is not.
*
* Rate-limit rationale: this is a liveness probe — no credential, so a
* ceiling and no counter.
*
* @return JSONResponse `{status, app, version, checks}`.
*
* @spec openspec/changes/adopt-apphost/specs/prometheus-metrics/spec.md — Requirement: Health Check Endpoint (REQ-PROM-007)
*/
#[PublicPage]
#[NoCSRFRequired]
// Liveness probe — no credential, so a ceiling and no counter.
#[AnonRateLimit(limit: 120, period: 60)]
public function index(): JSONResponse {
$appId = $this->appName;
Expand Down
13 changes: 7 additions & 6 deletions lib/Controller/PageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -555,18 +555,19 @@ private function buildWorkspaceCsp(): ContentSecurityPolicy {
* The image CSP is widened to `data:` so the bundled NL Design tile icons
* (base64 SVG data URIs) render for anonymous visitors too.
*
* Rate-limit rationale: this is the public share page — one of only four
* rendered public pages in the fleet (ADR-081). The share TOKEN is checked by
* PublicShareController, which already has brute-force protection wired
* through PublicShareService::registerAttempt(); this is just the shell that
* hosts it, so a volume ceiling is the right control and it is deliberately
* generous — a recipient reloading the page must not be what trips it.
*
* @return TemplateResponse The public page response.
*
* @spec openspec/changes/dashboard-public-share/specs/dashboard-public-share/spec.md
*/
#[PublicPage]
#[NoCSRFRequired]
// The public share page — one of only four rendered public pages in the
// fleet (ADR-081). The share TOKEN is checked by PublicShareController,
// which already has brute-force protection wired through
// PublicShareService::registerAttempt(); this is just the shell that hosts
// it, so a volume ceiling is the right control and it is deliberately
// generous — a recipient reloading the page must not be what trips it.
#[AnonRateLimit(limit: 120, period: 60)]
public function publicShare(): TemplateResponse {
Util::addScript(application: Application::APP_ID, file: 'launchpad-public');
Expand Down
Loading