forked from soveran/cuba
-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a0b8d4f
commit 855f84c
Showing
3 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
= New Features | ||
|
||
* A redirect_http_to_https plugin has been added, redirecting HTTP | ||
requests to the same path on an HTTPS site. Using the routing tree, | ||
you can control where to do the redirection, which allows you to | ||
easily have part of your site accessible via HTTP, with sensitive | ||
sections requiring HTTPS: | ||
|
||
plugin :redirect_http_to_https | ||
|
||
route do |r| | ||
# routes available via both HTTP and HTTPS | ||
r.redirect_http_to_https | ||
# routes available only via HTTPS | ||
end | ||
|
||
If you want to redirect to HTTPS for all routes in the routing tree, you | ||
can have r.redirect_http_to_https as the very first method call in the | ||
routing tree. Note that in Roda it is possible to handle routing before | ||
the normal routing tree using before hooks. The static_routing and | ||
heartbeat plugins use this feature. If you would like to handle routes | ||
before the normal routing tree, you can setup a before hook: | ||
|
||
plugin :hooks | ||
|
||
before do | ||
request.redirect_http_to_https | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters