Skip to content

Commit

Permalink
typos!
Browse files Browse the repository at this point in the history
  • Loading branch information
julienbourdeau committed Mar 31, 2024
1 parent b52bf1e commit 346a366
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion source/_docs/02-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ Make sure the frontend is allowed to connect to ActionCable.
You can define the allowed origins or disable the request forgery protection in your `config/environments/development.rb` file.

```ruby
Algolia::Application.configure do
Rails::Application.configure do
config.action_cable.disable_request_forgery_protection = true
# OR
# config.action_cable.allowed_request_origins = [
Expand Down
8 changes: 4 additions & 4 deletions source/_docs/04-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,20 @@ end

## Ignoring requests

Once the debugbar is enabled, every request will be monitored and the debugbar will be displayed. You can ignore some requests by setting the `ignored_request` option in the initializer. This is typically useful to ignore some requests that are not relevant to you.
Once the debugbar is enabled, every request will be monitored and the debugbar will be displayed. You can ignore some requests by setting the `ignore_request` option in the initializer. This is typically useful to ignore some requests that are not relevant to you.

By default, the debugbar will ignore all requests starting with `/assets` or `/_debugbar`.

```ruby
Debugbar.configure do |config|
# Ignore all requests starting with /admin
config.ignored_request = -> (env) { env['PATH_INFO'].start_with? '/admin' }
config.ignore_request = -> (env) { env['PATH_INFO'].start_with? '/admin' }

# Only log request to the API
config.ignored_request = -> (env) { not env['PATH_INFO'].start_with? '/api/v1' }
config.ignore_request = -> (env) { not env['PATH_INFO'].start_with? '/api/v1' }

# Ignore requests to admin, assets and debugbar
config.ignored_request = -> (env) do
config.ignore_request = -> (env) do
[Debugbar.config.prefix, "/assets", "/admin"].any? do |pfx|
env['PATH_INFO'].start_with? pfx
end
Expand Down

0 comments on commit 346a366

Please sign in to comment.