@@ -11,16 +11,26 @@ module ActionDispatch
11
11
#
12
12
# 1. **TLS redirect**: Permanently redirects `http://` requests to `https://`
13
13
# with the same URL host, path, etc. Enabled by default. Set
14
- # `config.ssl_options` to modify the destination URL (e.g. `redirect: {
15
- # host: "secure.widgets.com", port: 8080 }`), or set `redirect: false` to
16
- # disable this feature.
14
+ # `config.ssl_options` to modify the destination URL:
15
+ #
16
+ # config.ssl_options = { redirect: { host: "secure.widgets.com", port: 8080 }`
17
+ #
18
+ # Or set `redirect: false` to disable redirection.
17
19
#
18
20
# Requests can opt-out of redirection with `exclude`:
19
21
#
20
22
# config.ssl_options = { redirect: { exclude: -> request { /healthcheck/.match?(request.path) } } }
21
23
#
22
24
# Cookies will not be flagged as secure for excluded requests.
23
25
#
26
+ # When proxying through a load balancer that terminates SSL, the forwarded
27
+ # request will appear as though it's HTTP instead of HTTPS to the application.
28
+ # This makes redirects and cookie security target HTTP instead of HTTPS.
29
+ # To make the server assume that the proxy already terminated SSL, and
30
+ # that the request really is HTTPS, set `config.assume_ssl` to `true`:
31
+ #
32
+ # config.assume_ssl = true
33
+ #
24
34
# 2. **Secure cookies**: Sets the `secure` flag on cookies to tell browsers
25
35
# they must not be sent along with `http://` requests. Enabled by default.
26
36
# Set `config.ssl_options` with `secure_cookies: false` to disable this
0 commit comments