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 flag to avoid trailing slash in prefix #123

Merged
merged 6 commits into from
Apr 20, 2020
Merged

Conversation

jennyEckstein
Copy link
Contributor

#122
Add flag prefixAvoidTrailingSlash to avoid appending trailing slash to specified prefix.

Checklist

  • run npm run test and npm run benchmark (there is no benchmark script)
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message and code follows Code of conduct

@mcollina
Copy link
Member

Great work! Would you mind to add a test for the new type as well as a few of new test for the option (instead of changing existing ones!). Thanks!

@jennyEckstein
Copy link
Contributor Author

Great work! Would you mind to add a test for the new type as well as a few of new test for the option (instead of changing existing ones!). Thanks!

The test, that I altered was failing with my changes, since previously /static would have returned "Not Found" and now it returns 200. plugginOptions for "register /static" block now specifies prefixAvoidTrailingSlash = true, I thought of repurposing the test.
I can create a separate category for the option, to make it more clear. Thank you for a good suggestion.

@jennyEckstein jennyEckstein marked this pull request as ready for review April 20, 2020 00:17
@mcollina
Copy link
Member

Great work! Could you add a test for the type in test/types/index.ts? Thanks

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@mcollina mcollina requested review from Eomm and delvedor April 20, 2020 13:25
Copy link
Member

@delvedor delvedor left a comment

Choose a reason for hiding this comment

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

LGTM

@Eomm Eomm merged commit 2b6e91d into fastify:master Apr 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants