-
Notifications
You must be signed in to change notification settings - Fork 103
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
Added request to allowedPath option #321
Conversation
index.d.ts
Outdated
@@ -83,7 +83,7 @@ export interface FastifyStaticOptions extends SendOptions { | |||
redirect?: boolean; | |||
wildcard?: boolean; | |||
list?: boolean | ListOptionsJsonFormat | ListOptionsHtmlFormat; | |||
allowedPath?: (pathName: string, root?: string) => boolean; | |||
allowedPath?: (pathName: string, root?: string, request: FastifyRequest) => boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also test our types. Could you update them too? Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI is failing
Could you please rebase? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Tests are failing |
Added request to allowedPath option in order to allow more complex path validation.
Closes #319