Files
gitlab-foss/config/initializers/regexp.rb
2025-01-16 21:34:10 +00:00

7 lines
331 B
Ruby

# frozen_string_literal: true
# Timeout if Regular expression takes more than 40 seconds to compute.
# This is a conservative value and is to be evaluated later.
# This value can be overridden using the REGEXP_TIMEOUT_SECONDS environment value
Regexp.timeout = ENV.fetch('REGEXP_TIMEOUT_SECONDS', 40).to_f if RUBY_VERSION > "3.2"