#include "pihttpserverprotected.h" bool PIHTTPServerProtected::registerProtectedPath(const PIString & path, PIHTTP::Method method, RequestFunction handler) { RequestFunction h = std::move(handler); RequestFunction guarded = [this, h](const PIHTTP::MessageConst & r) -> PIHTTP::MessageMutable { if (!checkAccess(r)) return accessDeniedReply(r); return h(r); }; return registerPath(path, method, std::move(guarded)); }