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

add support for parameterize redirected resources due to trailing slash #12

Closed
wants to merge 5 commits into from

Conversation

laughingman-hass
Copy link
Collaborator

@laughingman-hass laughingman-hass commented Oct 25, 2023

What does this PR do?

Adds support for routes that contain a trailing slash which result in a redirect. If a redirect is detected due to a trailing slash, look up the parameters for the route without the trailing slash and use that for the parameterization

Motivation

Bug raised on upstream repo DataDog#2293

Reviewer's Checklist

  • Changed code has unit tests for its functionality at or near 100% coverage.
  • There is a benchmark for any new code, or changes to existing code.
  • If this interacts with the agent in a new way, a system test has been added.

For Datadog employees:

  • If this PR touches code that handles credentials of any kind, such as Datadog API keys, I've requested a review from @DataDog/security-design-and-guidance.
  • This PR doesn't touch any of that.

Unsure? Have a question? Request a review!

@laughingman-hass
Copy link
Collaborator Author

laughingman-hass commented Oct 25, 2023

  • add a test case to cover this.

@laughingman-hass laughingman-hass force-pushed the hass/2293-trail-slash-redirects branch 2 times, most recently from 90ffcfb to 846be8e Compare November 1, 2023 13:48
@laughingman-hass laughingman-hass self-assigned this Nov 1, 2023
@devillecodes
Copy link
Collaborator

Looks good to me! Thanks for adding the tests! 🙌

laughingman-hass and others added 5 commits November 29, 2023 12:23
If a redirect is detected due to a trailing slash, look up the
parameters for the route without the trailing slash and use that for the
parameterization
Co-authored-by: Katie Hockman <katie@hockman.dev>
Co-authored-by: Katie Hockman <katie@hockman.dev>
@laughingman-hass
Copy link
Collaborator Author

closing as PR upstream has been merged.

DataDog#2332

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants