|
drogon
C++14/17-based HTTP application framework
|

Go to the source code of this file.
Classes | |
| class | drogon::plugin::Redirector |
| This plugin is used to redirect requests to proper URLs. It is a helper plugin for other plugins, e.g. SlashRemover. Users can register a handler to this plugin to redirect requests. All handlers will be called in the order of registration. The json configuration is as follows: More... | |
Namespaces | |
| namespace | drogon |
| Drogon Test is a minimal effort test framework developed because the major C++ test frameworks doesn't handle async programs well. Drogon Test's syntax is inspired by both Google Test and Catch2. | |
Typedefs | |
| using | drogon::plugin::RedirectorHandler |
| The RedirectorHandler is a function object that can be registered to the Redirector plugin. It is used to redirect requests to proper URLs. Users can modify the protocol, host and path of the request. If a false value is returned, the request will be considered as invalid and a 404 response will be sent to the client. | |
| using | drogon::plugin::PathRewriteHandler = std::function<bool(const drogon::HttpRequestPtr &)> |
| The PathRewriteHandler is a function object that can be registered to the Redirector plugin. It is used to rewrite the path of the request. The Redirector plugin will call all registered PathRewriteHandlers in the order of registration. If one or more handlers return true, the request will be redirected to the new path. | |
| using | drogon::plugin::ForwardHandler = std::function<void(const drogon::HttpRequestPtr &)> |
| The ForwardHandler is a function object that can be registered to the Redirector plugin. It is used to forward the request to next processing steps in the framework. The Redirector plugin will call all registered ForwardHandlers in the order of registration. Users can use this handler to change the request path or any other part of the request. | |
Copyright 2018, An Tao. All rights reserved. https://github.com/an-tao/drogon Use of this source code is governed by a MIT license that can be found in the License file.
Drogon
The RedirectorHandler is a function object that can be registered to the Redirector plugin. It is used to redirect requests to proper URLs. Users can modify the protocol, host and path of the request. If a false value is returned, the request will be considered as invalid and a 404 response will be sent to the client.