Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the SecureSSLRedirector plugin #306

Merged
merged 3 commits into from
Nov 30, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update
  • Loading branch information
an-tao committed Nov 29, 2019
commit 1269b190fd0d6be93e2296e24ae63c67ee0cfa5f
11 changes: 6 additions & 5 deletions lib/inc/drogon/plugins/SecureSSLRedirector.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,19 @@ namespace plugin
"name": "drogon::plugin::SecureSSLRedirector",
"dependencies": [],
"config": {
"ssl_redirect_exempt": [],
"ssl_redirect_exempt": ["^/.*\\.jpg", ...],
"secure_ssl_host": "localhost:8849"
}
}
@endcode
*
* ssl_redirect_exempt: a regular expression list for URLs that don't have to be
* redirected.
* ssl_redirect_exempt: a regular expression (for matching the path of a
* request) 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.
* Adding the configuration to the plugin list of the configuration file enables
* the plugin.
*
* Enable the plugin by adding the configuration to the list of plugins in the
* configuration file.
*
*/
class SecureSSLRedirector : public drogon::Plugin<SecureSSLRedirector>
Expand Down