Project updates from Template (#1)
This PR contains the latest updates from the generic Website template, which have been added while working on #loud-amsterdam. Reviewed-on: #1 Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
This commit was merged in pull request #1.
This commit is contained in:
@@ -116,6 +116,9 @@ private extension HealthController {
|
||||
}
|
||||
|
||||
/// Builds a JSON response carrying the given status and payload.
|
||||
///
|
||||
/// Every response is marked `noindex`: the checks answer `200 OK` to anyone, and `robots.txt` allows the whole site. A `Disallow` rule would
|
||||
/// stop the crawl but not the indexing, and would publish the paths to everyone reading the file.
|
||||
/// - Parameters:
|
||||
/// - status: the HTTP status of the response.
|
||||
/// - payload: the JSON body of the response.
|
||||
@@ -126,7 +129,10 @@ private extension HealthController {
|
||||
) -> Response {
|
||||
Response(
|
||||
status: status,
|
||||
headers: [.contentType: "application/json"],
|
||||
headers: [
|
||||
.contentType: "application/json",
|
||||
.robotsTag: "noindex",
|
||||
],
|
||||
body: .init(byteBuffer: .init(string: payload))
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user