1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

14 commits

Author SHA1 Message Date
Andrew White
8227bf7ee9 Use request.fullpath to build redirect url in force_ssl
The `force_ssl` command now builds the redirect url from `request.fullpath`.
This ensures that the format is maintained and it doesn't redirect to a route
that has the same parameters but is defined earlier in `routes.rb`. Also any
optional segments are maintained.

Fixes #7528.
Fixes #9061.
Fixes #10305.
2013-04-25 08:33:21 +01:00
Francesco Rodriguez
a53a7bea80 update documentation and code to use _action callbacks 2012-12-07 14:46:06 -05:00
AvnerCohen
62f273b650 Multiple changes to 1,9 hash syntax 2012-10-27 22:05:27 +02:00
Ellis Berner
f7f70841b8 Missing closing tag 2012-08-12 11:26:56 -07:00
Jeremy Friesen
4791822368 Extracted redirect logic from ActionController::Force::ClassMethods.force_ssl
Prior to this patch the existing .force_ssl method handles both defining
the filter and handling the logic for performing the redirect.

With this patch the logic for redirecting to the HTTPS protocol is
separated from the filter logic that determines if a redirect should
occur.  By separating the two levels of behavior, an instance method
for ActionController (i.e. #force_ssl_redirect) is exposed and available
for more granular SSL enforcement.

Cleaned up indentation.
2012-05-31 12:39:28 -04:00
Santiago Pastorino
4c16791f35 Add ActionController::HTTP
More info http://edgeguides.rubyonrails.org/api_app.html

[Carlos Antonio da Silva & Santiago Pastorino]
2012-03-14 12:46:23 -03:00
Andrew White
5093915aae Document the :host option for force_ssl 2012-02-23 13:35:15 +00:00
Andrew White
c04a08470f Update documentation for force_ssl - closes #5023. 2012-02-23 13:25:13 +00:00
Pat Allan
ab838900f8 SSL should not be disabled by default in any environment. 2012-02-23 13:25:13 +00:00
Ryan McGeary
6efb849b32 Fixed force_ssl redirects to include original query params
`ActionController.force_ssl` redirects http URLs to their https equivalent;
however, when a URL contains a query string, the resulting redirect lacked the
original query string.

Conflicts:

	actionpack/lib/action_controller/metal/force_ssl.rb
2012-02-07 13:28:29 -05:00
Marcin Bunsch and Przemek Dąbek
321dae5dcc When force redirecting to SSL, make sure that the session is kept. As we're moving from a non-secure to secure environment, it's safe 2012-01-12 20:31:23 +01:00
Ben Scheirman
d68f27e9b1 accept optional :host parameter to force_ssl 2011-10-08 18:38:02 -05:00
Dmytrii Nagirniak
8f003de2c7 fix minor spelling mistakes in comments 2011-05-23 22:40:29 -07:00
Prem Sichanugrist
7cbdfa8303 Add controller-specific force_ssl method to force web browser to use HTTPS protocol
This would become useful for site which sometime transferring sensitive information such as account information on particular controller or action.

This featured was requested by DHH.
2011-03-28 04:58:47 +08:00