aboutsummaryrefslogtreecommitdiff
path: root/lib/mauve/web_interface.rb
diff options
context:
space:
mode:
authorAlex Young <alex@bytemark.co.uk>2015-04-20 16:30:54 +0100
committerAlex Young <alex@bytemark.co.uk>2015-04-20 16:30:54 +0100
commit552e87bd4bba2b30e1ae49f6ce997f46f5082465 (patch)
tree7254a5b651c7c53d81a14dd7e22f47b4f1d28d17 /lib/mauve/web_interface.rb
parent3e986ecfc544b94f329e35ae5b771f68ed27851a (diff)
Add Rack::Protection exception for ajax json requests
Diffstat (limited to 'lib/mauve/web_interface.rb')
-rw-r--r--lib/mauve/web_interface.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/mauve/web_interface.rb b/lib/mauve/web_interface.rb
index 896b9cb..5fa1fb8 100644
--- a/lib/mauve/web_interface.rb
+++ b/lib/mauve/web_interface.rb
@@ -66,6 +66,9 @@ module Mauve
set :raise_errors, false # ...will not let exceptions out to main program
set :show_exceptions, false # ...will not show exceptions
+ # We need this to avoid 403's on AJAX requests
+ set :protection, :except => :json_csrf
+
#
# Default template.
#