Skip to content

Commit 08e7ee0

Browse files
ignore OPTIONS api calls
1 parent 9a0567a commit 08e7ee0

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## UNRELEASED
44

55
* Handle multi-processes service (cluster mode in Puma) - See [#45](https://github.com/julienbourdeau/debugbar/pull/45)
6+
* Ignore OPTIONS requests - See [xx](https://github.com/julienbourdeau/debugbar/commit/xx)
67

78
## v0.3.3 - 2024-06-15
89

lib/debugbar/config.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ def ignore_request?(env)
3333
if ignore_request.is_a? Proc
3434
ignore_request.call(env)
3535
else
36-
[Debugbar.config.prefix, "/assets"].any? { |s| env['PATH_INFO'].start_with? s }
36+
[Debugbar.config.prefix, "/assets"].any? do |s|
37+
env['PATH_INFO'].start_with? s
38+
end || env['REQUEST_METHOD'] == "OPTIONS"
3739
end
3840
end
3941

0 commit comments

Comments
 (0)