dvMiddlewareKeysUnbuiltReason top-level constant
Keys nothing implements, and what to reach for instead.
The generator refuses a build that declares one of these. A developer who
wrote bodyLimit has decided large bodies are rejected; serving them is
not a smaller failure for having been quiet about it.
Implementation
const Map<String, String> dvMiddlewareKeysUnbuiltReason = <String, String>{
'policy': 'Nothing carries the policy name, so this key cannot say which '
'policy applies. Declare it on the function instead: '
'@DVBackendFunction(policy: DVPolicies.yourPolicy), which is enforced '
'per route.',
'cors': 'CORS is answered for the whole server, not per route: the '
'headers go on every response including the preflight, which never '
'reaches a route. Configure it under dartvel.server.cors, naming '
'the origins you answer.',
'compression': 'Compression is decided when the server starts, so a '
'per-route declaration would change nothing. Configure it under '
'dartvel.server.compression, where false turns it off.',
'rateLimitCheckout': 'Nothing implements this. It is not a preset of '
'rateLimit; there is no code behind the name at all. Use '
'DVMiddlewares.rateLimit.',
'cacheTags': 'Nothing implements this. Cache invalidation lives on '
'DV.Cache: set(key, value, tags: ...) and delete(DVCacheTag(...)).',
};