From 5a833be33d2eaa7922adde7d35c9c24219dd4d2d Mon Sep 17 00:00:00 2001 From: Javier Cicchelli Date: Sun, 30 Aug 2026 08:37:19 +0200 Subject: [PATCH] Updated the documentations in the Website service target. --- Services/Website/README.md | 59 +++++++++---------- .../Sources/App/Extensions/App+Build.swift | 4 +- .../Extensions/ConfigReader+Properties.swift | 2 +- .../Library/Internal/Pages/NotFoundPage.swift | 6 +- .../Library/Internal/Types/StaticFile.swift | 3 +- .../Public/Controllers/HealthController.swift | 6 +- .../NotFoundMiddleware+Defaults.swift | 4 +- 7 files changed, 41 insertions(+), 43 deletions(-) diff --git a/Services/Website/README.md b/Services/Website/README.md index 9255e62..5d21b0a 100644 --- a/Services/Website/README.md +++ b/Services/Website/README.md @@ -38,14 +38,16 @@ The persistence backend runs as a `Fluent` service inside the application's Serv Requests pass through the middleware chain in this order (outermost first), then reach the routes: ``` LogRequestsMiddleware - → SecurityHeadersMiddleware (security headers on every response) - → VaryMiddleware (marks every response as varying on Accept-Encoding) - → ResponseCompressionMiddleware (gzip/deflate above the size threshold) - → LocalizationMiddleware (negotiates the request's language) - → NotFoundMiddleware (renders the localized not-found page on .notFound) - → FileMiddleware (serves Resources/Static) -RootController (GET / → landing page) -HealthController (GET /health → liveness, GET /health/ready → readiness) + → SecurityHeadersMiddleware (security headers on every response) + → HTTPSRedirectMiddleware (301 to site.origin when forwarded over plain HTTP) + → TrailingSlashRedirectMiddleware (301 to the path without a trailing slash) + → VaryMiddleware (marks every response as varying on Accept-Encoding) + → ResponseCompressionMiddleware (gzip/deflate above the size threshold) + → LocalizationMiddleware (negotiates the request's language) + → NotFoundMiddleware (renders the localized not-found page on .notFound) + → FileMiddleware (serves Resources/Static) +RootController (GET / → landing page) +HealthController (GET /health → liveness, GET /health/ready → readiness) ``` The router is created with `.autoGenerateHeadEndpoints`, so each of those `GET` routes gets a `HEAD` sibling for free. @@ -63,7 +65,9 @@ Four of those are page-authored, optional, and **omitted by default** — the re The fifth, `analytics`, is *configuration*-authored rather than page-authored: the executable builds an `Analytics` from the `analytics.*` keys and hands it to `RootController` and `NotFoundMiddleware`, which pass it to both pages. It renders as a `` plus a deferred `