Skip to content

Configuration

Charles Maresh edited this page Nov 8, 2019 · 3 revisions

In general, you shouldn't need to configure stitches itself, but you can if you like.

When you ran the generator during Setup, an initializer should've been created in config/initializers/stitches.rb. This is where you can specify configuration.

Stitches.configure do |configuration|
  # configuration is an instance of Stitches::Configuration

  configuration.allowlist_regexp = # a regexp of all routes to allow in without an api key
  configuration.custom_auth_scheme = # The String name for your auth scheme
  configuration.env_var_to_hold_api_client = # name of the var in request.env where the ApiClient instance for this request is held.
end
Clone this wiki locally