mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 22:15:35 +08:00
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:
@ -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
|
||||
|
Reference in New Issue
Block a user