From 91dea49fc7df4634e486fcc0294e5c685f25b77a Mon Sep 17 00:00:00 2001 From: Marius Date: Thu, 30 Mar 2017 15:17:41 +0200 Subject: [PATCH] Add explicit notice about no cookies in hooks In regards to https://github.com/tus/tusd/pull/58#issuecomment-290379041 --- docs/hooks.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/hooks.md b/docs/hooks.md index 55d6101..a76c960 100644 --- a/docs/hooks.md +++ b/docs/hooks.md @@ -50,6 +50,8 @@ The process of the hook files are provided with information about the event and } ``` +Be aware that this environment does *not* contain direct data from any HTTP request, in particular not any header values or cookies. If you would like to pass information from the client to the hook, such as authentication details, you may wish to use the [metadata system](http://tus.io/protocols/resumable-upload.html#upload-metadata). + ## Blocking and Non-Blocking Hooks If not otherwise noted, all hooks are invoked in a *non-blocking* way, meaning that tusd will not wait until the hook process has finished and exited. Therefore, the hook process is not able to influence how tusd may continue handling the current request, regardless of which exit code it may set. Furthermore, the hook process' stdout and stderr will be piped to tusd's stdout and stderr correspondingly, allowing one to use these channels for additional logging.