Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't send request on OPTIONS #68

Merged
merged 1 commit into from
Aug 25, 2020

Conversation

thestrabusiness
Copy link
Contributor

🧰 What's being changed?

This commit updates the behavior of the middleware to skip processing
OPTIONS requests.

🧪 Testing

A new test was added to the test suite to ensure a request is not made to the ReadMe API. This was also tested manually using a rack application and this curl command:

curl -i -X OPTIONS localhost:9292/api

No corresponding item shows up in the dashboard.

packages/ruby/lib/readme/metrics.rb Outdated Show resolved Hide resolved
packages/ruby/spec/http_request_spec.rb Outdated Show resolved Hide resolved
packages/ruby/spec/http_request_spec.rb Outdated Show resolved Hide resolved
This commit updates the behavior of the middleware to skip processing
OPTIONS requests.
@thestrabusiness thestrabusiness merged commit dfd6f50 into master Aug 25, 2020
@thestrabusiness thestrabusiness deleted the am-filter-out-options-request branch August 25, 2020 18:18
djmango pushed a commit to djmango/metrics-sdks that referenced this pull request Sep 19, 2023
…io#68)

* fix: use postData.text for JSON to handle nested body content

After seeing issues with nested object content where param values were objects when they should only be strings (and talking with @erunion and @domharrington), I opted to update our request processing so we're using postData.text to store JSON request bodies, instead of postData.params.

This is more compliant with HAR and it allows us to store nested request body content properly.

* fix another test

* Update lib/process-request.js

Co-Authored-By: Jon Ursenbach <erunion@users.noreply.github.com>

Co-authored-by: Jon Ursenbach <erunion@users.noreply.github.com>
@erunion erunion added ruby Issues related to our Ruby SDK and removed area:ruby labels Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ruby Issues related to our Ruby SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants