Commit c2ac55bb063bd450b1693fb36720ae78351b27c0
Exists in
master
and in
21 other branches
Merge remote-tracking branch 'origin/master'
Showing
4 changed files
with
19 additions
and
9 deletions
Show diff stats
config/application.rb
| @@ -111,9 +111,7 @@ module Noosfero | @@ -111,9 +111,7 @@ module Noosfero | ||
| 111 | # Make sure the secret is at least 30 characters and all random, | 111 | # Make sure the secret is at least 30 characters and all random, |
| 112 | # no regular words or you'll be exposed to dictionary attacks. | 112 | # no regular words or you'll be exposed to dictionary attacks. |
| 113 | config.secret_token = noosfero_session_secret | 113 | config.secret_token = noosfero_session_secret |
| 114 | - config.action_dispatch.session = { | ||
| 115 | - :key => '_noosfero_session', | ||
| 116 | - } | 114 | + config.session_store :cookie_store, :key => '_noosfero_session' |
| 117 | 115 | ||
| 118 | config.time_zone = File.read('/etc/timezone').split("\n").first | 116 | config.time_zone = File.read('/etc/timezone').split("\n").first |
| 119 | config.active_record.default_timezone = :local | 117 | config.active_record.default_timezone = :local |
debian/control
| @@ -61,6 +61,11 @@ Depends: | @@ -61,6 +61,11 @@ Depends: | ||
| 61 | dbconfig-common, | 61 | dbconfig-common, |
| 62 | adduser, | 62 | adduser, |
| 63 | exim4 | mail-transport-agent, | 63 | exim4 | mail-transport-agent, |
| 64 | +# to minimize upgrade issues: | ||
| 65 | + ruby-feedparser (>= 0.7-3~), | ||
| 66 | + ruby-eventmachine (>= 0.12.10-4~), | ||
| 67 | + ruby-rack (>= 1.4.5-2~), | ||
| 68 | + ruby-tzinfo (>= 1.1.0-2~), | ||
| 64 | ${misc:Depends} | 69 | ${misc:Depends} |
| 65 | Recommends: | 70 | Recommends: |
| 66 | postgresql, | 71 | postgresql, |
etc/noosfero/varnish-noosfero.vcl
| @@ -10,6 +10,13 @@ sub vcl_recv { | @@ -10,6 +10,13 @@ sub vcl_recv { | ||
| 10 | } | 10 | } |
| 11 | } | 11 | } |
| 12 | 12 | ||
| 13 | +sub vcl_deliver { | ||
| 14 | + # Force clients to aways hit the server again for HTML pages | ||
| 15 | + if (resp.http.Content-Type ~ "^text/html") { | ||
| 16 | + set resp.http.Cache-Control = "no-cache"; | ||
| 17 | + } | ||
| 18 | +} | ||
| 19 | + | ||
| 13 | sub vcl_error { | 20 | sub vcl_error { |
| 14 | set obj.http.Content-Type = "text/html; charset=utf-8"; | 21 | set obj.http.Content-Type = "text/html; charset=utf-8"; |
| 15 | 22 |
vendor/plugins/noosfero_caching/init.rb
| @@ -49,11 +49,11 @@ module NoosferoHttpCaching | @@ -49,11 +49,11 @@ module NoosferoHttpCaching | ||
| 49 | 49 | ||
| 50 | # filter off all cookies except for plugin-provided ones that are | 50 | # filter off all cookies except for plugin-provided ones that are |
| 51 | # path-specific (i.e path != "/"). | 51 | # path-specific (i.e path != "/"). |
| 52 | - def remove_unwanted_cookies(cookie_list) | ||
| 53 | - return nil if cookie_list.nil? | ||
| 54 | - cookie_list.select do |c| | 52 | + def remove_unwanted_cookies(set_cookie) |
| 53 | + return nil if set_cookie.nil? | ||
| 54 | + set_cookie.split(/\s*,\s*/).select do |c| | ||
| 55 | c =~ /^_noosfero_plugin_\w+=/ && c =~ /path=\/\w+/ | 55 | c =~ /^_noosfero_plugin_\w+=/ && c =~ /path=\/\w+/ |
| 56 | - end | 56 | + end.join(', ') |
| 57 | end | 57 | end |
| 58 | 58 | ||
| 59 | end | 59 | end |
| @@ -61,7 +61,7 @@ module NoosferoHttpCaching | @@ -61,7 +61,7 @@ module NoosferoHttpCaching | ||
| 61 | end | 61 | end |
| 62 | 62 | ||
| 63 | unless Rails.env.development? | 63 | unless Rails.env.development? |
| 64 | - middleware = Rails.application.config.middleware | 64 | + middleware = Noosfero::Application.config.middleware |
| 65 | ActionController::Base.send(:include, NoosferoHttpCaching) | 65 | ActionController::Base.send(:include, NoosferoHttpCaching) |
| 66 | - middleware.use NoosferoHttpCaching::Middleware | 66 | + middleware.insert_before ::ActionDispatch::Cookies, NoosferoHttpCaching::Middleware |
| 67 | end | 67 | end |