-
Notifications
You must be signed in to change notification settings - Fork 479
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
cli: add header forwarding in HTTP hooks #371
Conversation
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.
This is looking good, thank you. Could you also please update the documentation in docs/hooks.md to reflect this feature?
cmd/tusd/cli/flags.go
Outdated
@@ -55,6 +56,7 @@ func ParseFlags() { | |||
flag.StringVar(&Flags.EnabledHooksString, "hooks-enabled-events", "", "Comma separated list of enabled hook events (e.g. post-create,post-finish). Leave empty to enable all events") | |||
flag.StringVar(&Flags.FileHooksDir, "hooks-dir", "", "Directory to search for available hooks scripts") | |||
flag.StringVar(&Flags.HttpHooksEndpoint, "hooks-http", "", "An HTTP endpoint to which hook events will be sent to") | |||
flag.StringVar(&Flags.HttpHooksForwardHeaders, "hooks-http-forward-headers", "", "List of HTTP request headers to include in hook request") |
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.
Please reword the description so it's apparent that the header values are forwarded from the client's requests.
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.
Thank you very much!
* core: add new synchronous event: pre-finish * docs: pre-finish hook event * docs: Added information about CORS to the FAQ. (#384) * Added information about CORS to the FAQ. * docs: Expand explanation of CORS Co-authored-by: Marius <marius@transloadit.com> * cli: add header forwarding in HTTP hooks (#371) * cli: add header forwarding in HTTP hooks * docs: Reword header forwarding flag, add documentation * Don't enable pre-finish hooks by default * Enable pre-finish hooks for plugins * docs: default enabled hooks * Rename callback Co-authored-by: josh-marshall-jax <52457971+josh-marshall-jax@users.noreply.github.com> Co-authored-by: Marius <marius@transloadit.com>
* cli: add header forwarding in HTTP hooks * docs: Reword header forwarding flag, add documentation
* core: add new synchronous event: pre-finish * docs: pre-finish hook event * docs: Added information about CORS to the FAQ. (tus#384) * Added information about CORS to the FAQ. * docs: Expand explanation of CORS Co-authored-by: Marius <marius@transloadit.com> * cli: add header forwarding in HTTP hooks (tus#371) * cli: add header forwarding in HTTP hooks * docs: Reword header forwarding flag, add documentation * Don't enable pre-finish hooks by default * Enable pre-finish hooks for plugins * docs: default enabled hooks * Rename callback Co-authored-by: josh-marshall-jax <52457971+josh-marshall-jax@users.noreply.github.com> Co-authored-by: Marius <marius@transloadit.com>
* cli: add header forwarding in HTTP hooks * docs: Reword header forwarding flag, add documentation
* core: add new synchronous event: pre-finish * docs: pre-finish hook event * docs: Added information about CORS to the FAQ. (tus#384) * Added information about CORS to the FAQ. * docs: Expand explanation of CORS Co-authored-by: Marius <marius@transloadit.com> * cli: add header forwarding in HTTP hooks (tus#371) * cli: add header forwarding in HTTP hooks * docs: Reword header forwarding flag, add documentation * Don't enable pre-finish hooks by default * Enable pre-finish hooks for plugins * docs: default enabled hooks * Rename callback Co-authored-by: josh-marshall-jax <52457971+josh-marshall-jax@users.noreply.github.com> Co-authored-by: Marius <marius@transloadit.com>
Closes #369