aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/CHANGELOG.md
diff options
context:
space:
mode:
authorYuki Nishijima <mail@yukinishijima.net>2015-05-01 19:12:45 -0700
committerYuki Nishijima <mail@yukinishijima.net>2015-06-13 09:30:23 -0700
commit52260581638406d910e09e8d2e66b51acb76c5c6 (patch)
tree489fda2ba90d2a39abedf87890db19bcd7c1bc6a /actionpack/CHANGELOG.md
parentdfc9269517d787d187ee46c798a4ea0893de0381 (diff)
downloadrails-52260581638406d910e09e8d2e66b51acb76c5c6.tar.gz
rails-52260581638406d910e09e8d2e66b51acb76c5c6.tar.bz2
rails-52260581638406d910e09e8d2e66b51acb76c5c6.zip
Add the ability of returning arbitrary headers to ActionDispatch::Static
Now ActionDispatch::Static can accept HTTP headers so that developers will have control of returning arbitrary headers like 'Access-Control-Allow-Origin' when a response is delivered. They can be configured through `#config.public_file_server.headers`: config.public_file_server.headers = { "Cache-Control" => "public, max-age=60", "Access-Control-Allow-Origin" => "http://rubyonrails.org" } Also deprecate `config.static_cache_control` in favor of `config.public_file_server.headers`.
Diffstat (limited to 'actionpack/CHANGELOG.md')
-rw-r--r--actionpack/CHANGELOG.md19
1 files changed, 19 insertions, 0 deletions
diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md
index 78ae506389..2dabadcf3d 100644
--- a/actionpack/CHANGELOG.md
+++ b/actionpack/CHANGELOG.md
@@ -1,3 +1,22 @@
+* Deprecate `config.static_cache_control` in favor of
+ `config.public_file_server.headers`
+
+ *Yuki Nishijima*
+
+* Add the ability of returning arbitrary headers to ActionDispatch::Static
+
+ Now ActionDispatch::Static can accept HTTP headers so that developers
+ will have control of returning arbitrary headers like
+ 'Access-Control-Allow-Origin' when a response is delivered. They can be
+ configured with `#config`:
+
+ config.public_file_server.headers = {
+ "Cache-Control" => "public, max-age=60",
+ "Access-Control-Allow-Origin" => "http://rubyonrails.org"
+ }
+
+ *Yuki Nishijima*
+
* Adds`Rack::Utils::ParameterTypeError` and `Rack::Utils::InvalidParameterError`
to the rescue_responses hash in `ExceptionWrapper` (Rack recommends
integrators serve 400s for both of these).