Sha256: 88180b8d38b31eeb9a83639d0688768301cb41a0538848cab10587ee7c048828
Contents?: true
Size: 1.41 KB
Versions: 4
Compression:
Stored size: 1.41 KB
Contents
module Qa class Configuration def cors_headers? return @cors_headers_enabled unless @cors_headers_enabled.nil? @cors_headers_enabled = false end def enable_cors_headers @cors_headers_enabled = true end def disable_cors_headers @cors_headers_enabled = false end # Provide a token that allows reloading of linked data authorities through the controller # action '/reload/linked_data/authorities?auth_token=YOUR_AUTH_TOKEN_DEFINED_HERE' without # requiring a restart of rails. By default, reloading through the browser is not allowed # when the token is nil or blank. Change to your approved token string in # config/initializers/qa.rb. attr_writer :authorized_reload_token def authorized_reload_token @authorized_reload_token ||= nil end def valid_authority_reload_token?(token) return false if token.blank? || authorized_reload_token.blank? token == authorized_reload_token end # Hold linked data authority configs attr_accessor :linked_data_authority_configs # For linked data access, specify default language for sorting and selection. The default is only used if a language is not # specified in the authority's configuration file and not passed in as a parameter. (e.g. :en, [:en], or [:en, :fr]) attr_writer :default_language def default_language @default_language ||= :en end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
qa-4.0.0 | lib/qa/configuration.rb |
qa-4.0.0.rc3 | lib/qa/configuration.rb |
qa-4.0.0.rc2 | lib/qa/configuration.rb |
qa-4.0.0.rc1 | lib/qa/configuration.rb |