aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
diff options
context:
space:
mode:
authorAndrew White <andyw@pixeltrix.co.uk>2012-12-05 02:21:44 -0800
committerAndrew White <andyw@pixeltrix.co.uk>2012-12-05 02:21:44 -0800
commite905639af2fe947ff7e1e2331e9216032dff8b3e (patch)
tree12363a0b618b5cce5228779257036aa0c601e850 /guides/source
parent4af9be089c345c58b6eae462226ca7190bc6bb73 (diff)
parent86e3aaab939a67536f007d1633ec19521dba15e9 (diff)
downloadrails-e905639af2fe947ff7e1e2331e9216032dff8b3e.tar.gz
rails-e905639af2fe947ff7e1e2331e9216032dff8b3e.tar.bz2
rails-e905639af2fe947ff7e1e2331e9216032dff8b3e.zip
Merge pull request #8404 from freegenie/filter_redirects
Diffstat (limited to 'guides/source')
-rw-r--r--guides/source/action_controller_overview.md27
1 files changed, 24 insertions, 3 deletions
diff --git a/guides/source/action_controller_overview.md b/guides/source/action_controller_overview.md
index 69d99becb9..8bd28d5246 100644
--- a/guides/source/action_controller_overview.md
+++ b/guides/source/action_controller_overview.md
@@ -751,15 +751,36 @@ Now the user can request to get a PDF version of a client just by adding ".pdf"
GET /clients/1.pdf
```
-Parameter Filtering
--------------------
+Log Filtering
+-------------
+
+Rails keeps a log file for each environment in the `log` folder. These are extremely useful when debugging what's actually going on in your application, but in a live application you may not want every bit of information to be stored in the log file.
-Rails keeps a log file for each environment in the `log` folder. These are extremely useful when debugging what's actually going on in your application, but in a live application you may not want every bit of information to be stored in the log file. You can filter certain request parameters from your log files by appending them to `config.filter_parameters` in the application configuration. These parameters will be marked [FILTERED] in the log.
+### Parameters Filtering
+
+You can filter certain request parameters from your log files by appending them to `config.filter_parameters` in the application configuration. These parameters will be marked [FILTERED] in the log.
```ruby
config.filter_parameters << :password
```
+### Redirects Filtering
+
+Sometimes it's desirable to filter out from log files some sensible locations your application is redirecting to.
+You can do that by using the `config.filter_redirect` configuration option:
+
+```ruby
+config.filter_redirect << 's3.amazonaws.com'
+```
+
+You can set it to a String, a Regexp, or an array of both.
+
+```ruby
+config.filter_redirect.concat ['s3.amazonaws.com', /private_path/]
+```
+
+Matching URLs will be marked as '[FILTERED]'.
+
Rescue
------