FIX: return 429 when admin api key is limited on admin route

This also handles a general case where exceptions leak out prior to being handled by the application controller
This commit is contained in:
Sam
2018-01-12 14:15:10 +11:00
parent dcbaf2f213
commit 49ed382c2a
39 changed files with 322 additions and 349 deletions

View File

@ -10,12 +10,15 @@ Discourse::Application.configure do
# Configure static asset server for tests with Cache-Control for performance
config.public_file_server.enabled = true
# Show full error reports and disable caching
config.consider_all_requests_local = true
# don't consider reqs local so we can properly handle exceptions like we do in prd
config.consider_all_requests_local = false
# disable caching
config.action_controller.perform_caching = false
# Raise exceptions instead of rendering exception templates
config.action_dispatch.show_exceptions = false
# production has "show exceptions" on so we better have it
# in test as well
config.action_dispatch.show_exceptions = true
# Disable request forgery protection in test environment
config.action_controller.allow_forgery_protection = false