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>
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
// 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");
|
||||
}
|
||||
Reference in New Issue
Block a user