Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MiddlewaresList DefaultPipeline() {
- return {
- // Metrics should go before everything else, basically.
- std::string{"userver-handler-metrics-middleware"},
- // Tracing should go before UnknownExceptionsHandlingMiddleware because it
- // adds some headers, which otherwise might be cleared
- std::string{"userver-tracing-middleware"},
- // Ditto
- std::string{"userver-set-accept-encoding-middleware"},
- // Every exception caught here is transformed into Http500 without context
- std::string{"userver-unknown-exceptions-handling-middleware"},
- // Should be self-explanatory
- std::string{"userver-rate-limit-middleware"},
- std::string{"userver-deadline-propagation-middleware"},
- std::string{"userver-baggage-middleware"},
- std::string{"userver-auth-middleware"},
- std::string{"userver-decompression-middleware"},
- // Transforms CustomHandlerException into response as specified by the
- // exception, transforms std::exception into Http500 without context
- std::string{"userver-exceptions-handling-middleware"},
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement