aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/environment.rb8
-rw-r--r--config/general.yml-example6
-rw-r--r--config/varnish-alaveteli.vcl6
3 files changed, 16 insertions, 4 deletions
diff --git a/config/environment.rb b/config/environment.rb
index d15ee9a0e..f2164f1c8 100644
--- a/config/environment.rb
+++ b/config/environment.rb
@@ -131,6 +131,9 @@ I18n.locale = default_locale
I18n.available_locales = available_locales.map {|locale_name| locale_name.to_sym}
I18n.default_locale = default_locale
+# Customise will_paginate URL generation
+WillPaginate::ViewHelpers.pagination_options[:renderer] = 'WillPaginateExtension::LinkRenderer'
+
# Load monkey patches and other things from lib/
require 'ruby19.rb'
require 'tmail_extensions.rb'
@@ -139,10 +142,13 @@ require 'timezone_fixes.rb'
require 'use_spans_for_errors.rb'
require 'make_html_4_compliant.rb'
require 'activerecord_errors_extensions.rb'
-require 'willpaginate_hack.rb'
+require 'willpaginate_extension.rb'
require 'sendmail_return_path.rb'
require 'tnef.rb'
require 'i18n_fixes.rb'
require 'rack_quote_monkeypatch.rb'
require 'world_foi_websites.rb'
require 'alaveteli_external_command.rb'
+
+ExceptionNotification::Notifier.sender_address = MySociety::Config::get('EXCEPTION_NOTIFICATIONS_FROM')
+ExceptionNotification::Notifier.exception_recipients = MySociety::Config::get('EXCEPTION_NOTIFICATIONS_TO')
diff --git a/config/general.yml-example b/config/general.yml-example
index be39e5b3c..a0d9dc705 100644
--- a/config/general.yml-example
+++ b/config/general.yml-example
@@ -131,3 +131,9 @@ FORWARD_NONBOUNCE_RESPONSES_TO: user-support@localhost
# instead.
HTML_TO_PDF_COMMAND: /usr/local/bin/wkhtmltopdf-amd64
+# Exception notifications
+EXCEPTION_NOTIFICATIONS_FROM: do-not-reply-to-this-address@example.com
+EXCEPTION_NOTIFICATIONS_TO:
+- robin@example.org
+- seb@example.org
+
diff --git a/config/varnish-alaveteli.vcl b/config/varnish-alaveteli.vcl
index 3312c381b..d6c42e750 100644
--- a/config/varnish-alaveteli.vcl
+++ b/config/varnish-alaveteli.vcl
@@ -27,9 +27,9 @@ sub vcl_recv {
remove req.http.X-Forwarded-For;
set req.http.X-Forwarded-For = client.ip;
- # Remove has_js and Google Analytics cookies.
- set req.http.Cookie = regsuball(req.http.Cookie, "(^|;\s*)(__[a-z]+|has_js)=[^;]*", "");
-
+ # Remove Google Analytics, has_js, and last-seen cookies
+ set req.http.Cookie = regsuball(req.http.Cookie, "(^|;\s*)(__[a-z]+|has_js|last_body_id|last_request_id|seen_foi2)=[^;]*", "");
+
# Normalize the Accept-Encoding header
if (req.http.Accept-Encoding) {
if (req.url ~ "\.(jpg|jpeg|png|gif|gz|tgz|bz2|tbz|mp3|ogg|swf|flv|pdf|ico)$") {