Files
retoorandClaude Sonnet 5.5 62fdd08da8 feat(workflow): example covers security, platform, enterprise and resilience features
105 route tests, matrix crawl, spec and README updated.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 02:19:52 +02:00

15 lines
630 B
C++

// Route: GET /security/headers (hardening headers applied)
#include "support/Assert.hpp"
using namespace molo::example::test;
int main() {
Fixture f;
auto r = f.client->get("/security/headers");
check(r.status == 200, "status 200");
check(r.headers.get("X-Content-Type-Options") == "nosniff", "nosniff");
check(r.headers.get("X-Frame-Options") == "DENY", "frame deny");
check(r.headers.has("Strict-Transport-Security"), "hsts");
check(contains(r.body, "Referrer-Policy"), "body lists headers");
check(f.client->post("/security/headers", "x").status == 405, "POST is 405");
return finish("security/headers");
}