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

Enable validation of events representing local servers #68

Merged
merged 1 commit into from
Jun 20, 2022

Conversation

PSalant726
Copy link
Contributor

@PSalant726 PSalant726 commented Jun 17, 2022

Closes #67

When submitting events to the /events endpoint that represent API requests made by a server running locally (Ex. a host of 0.0.0.0), the endpoint validation fails due to a bug in the third-party validation library.

These are legitimate events (or if they are illegitimate events, it is not due to this host value), so they should pass validation. The validator now simply replaces the 0.0.0.0 host with localhost. This does not affect event accuracy, because the endpoint URL is ultimately truncated such that it only includes the URL path.

When submitting events to the `/events` endpoint that represent API
requests made by a server running locally (Ex. a host of `0.0.0.0`),
the endpoint validation fails due to a bug in the third-party
validation library.

These are legitimate events (or if they are illegitimate events, it is
not due to this host value), so they should pass validation. The
validator now simply replaces the `0.0.0.0` host with `localhost`. This
does not affect event accuracy, because the endpoint URL is ultimately
truncated such that it only includes the URL path.
@PSalant726 PSalant726 added the bug Something isn't working label Jun 17, 2022
@PSalant726 PSalant726 self-assigned this Jun 17, 2022
Copy link
Contributor

@eastandwestwind eastandwestwind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me!

@PSalant726 PSalant726 merged commit c19a49d into main Jun 20, 2022
@PSalant726 PSalant726 deleted the allow-local-requests branch June 20, 2022 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow 0.0.0.0 host in endpoint property
2 participants