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

fix: simplify routing in createNodeMiddleware #934

Closed
wants to merge 1 commit into from

Conversation

Uzlopak
Copy link
Contributor

@Uzlopak Uzlopak commented Nov 29, 2023

Actually I dont get why we should actually take care of invalid routes. The original issue arose because we use new URL call, which throws an error on the example "//". I assume that new URL was used to ensure, that ankers # and querystrings are parsed away to get the actual pathname.

I say, this is unnecessary. We just need to check if the pathname is equal to the options.path. We dont handle querystrings and ankers, so we can boil this down to this simple solution.

Resolves #ISSUE_NUMBER


Before the change?

After the change?

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes
  • No

@Uzlopak Uzlopak marked this pull request as draft November 29, 2023 11:10
@Uzlopak Uzlopak closed this Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

1 participant