mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Introduce regex_timeout_seconds global setting (#20774)
This is introduced as `nil` by default. We intend to set a sensible default once we have performed some real-world testing.
This commit is contained in:
@@ -371,3 +371,6 @@ pg_force_readonly_mode = false
|
|||||||
|
|
||||||
# default DNS query timeout for FinalDestination (used when not explicitely given programmatically)
|
# default DNS query timeout for FinalDestination (used when not explicitely given programmatically)
|
||||||
dns_query_timeout_secs =
|
dns_query_timeout_secs =
|
||||||
|
|
||||||
|
# Default global regex timeout
|
||||||
|
regex_timeout_seconds =
|
||||||
|
|||||||
4
config/initializers/100-regex-timeout.rb
Normal file
4
config/initializers/100-regex-timeout.rb
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
Regexp.timeout =
|
||||||
|
GlobalSetting.regex_timeout_seconds.to_i if GlobalSetting.regex_timeout_seconds.present?
|
||||||
Reference in New Issue
Block a user