const mixinafSleepSafe::Guard

afSleepSafe::Guard

Guard against malicious attacks by inspecting HTTP requests.

Once implemented, contribute it to SleepSafeMiddleware:

@Contribute { serviceType=SleepSafeMiddleware# }
Void contributeSleepSafeMiddleware(Configuration config) {
    config[MyGuard#] = config.build(MyGuard#)
}
guard

Source

abstract Str? guard(HttpRequest req, HttpResponse res)

Called at the start of HTTP request. Return an error message to reject the request.

protectsAgainst

Source

abstract Str protectsAgainst()

Return what this Guard protects against. Used in startup logging.