|
drogon
C++14/17-based HTTP application framework
|
This plugin is used to redirect all non-HTTPS requests to HTTPS (except for those URLs matching a regular expression listed in the 'ssl_redirect_exempt' list). More...
#include <drogon/plugins/SecureSSLRedirector.h>


Public Member Functions | |
| void | initAndStart (const Json::Value &config) override |
| void | shutdown () override |
| Public Member Functions inherited from drogon::PluginBase | |
| void | initialize () |
| This method must be called by drogon. | |
| Public Member Functions inherited from drogon::DrObject< SecureSSLRedirector > | |
| const std::string & | className () const override |
| Get the class name. | |
| bool | isClass (const std::string &class_name) const override |
| Return true if the class name is 'class_name'. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from drogon::DrObject< SecureSSLRedirector > | |
| static const std::string & | classTypeName () |
This plugin is used to redirect all non-HTTPS requests to HTTPS (except for those URLs matching a regular expression listed in the 'ssl_redirect_exempt' list).
The json configuration is as follows:
ssl_redirect_exempt: must be a string or a string array, present a regular expression (for matching the path of a request) or a regular expression list for URLs that don't have to be redirected.
secure_ssl_host: If this string is not empty, all SSL redirects will be directed to this host rather than the originally-requested host.
Enable the plugin by adding the configuration to the list of plugins in the configuration file.
|
overridevirtual |
This method must be called by drogon to initialize and start the plugin. It must be implemented by the user.
Implements drogon::PluginBase.
|
overridevirtual |
This method must be called by drogon to shutdown the plugin. It must be implemented by the user.
Implements drogon::PluginBase.