-
Notifications
You must be signed in to change notification settings - Fork 45
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
$return a "cookies" object has no effect in V2 - emit warning #284
Comments
/cc @mhoeger for FYI I can repro that using the function from the issue with this function.json
|
Actually I see a test here for that scenario, so I'm not sure if it's a core-tools specific issue? |
@kepikoi - what version of functions are you using? |
@ahmelsayed I just tested the PS C:\> func -v
2.7.2184
PS C:\> node -v
v10.19.0
PS C:\> npm -v
6.13.4
PS C:\> [System.Environment]::OSVersion.Version
Major Minor Build Revision
----- ----- ----- --------
10 0 18362 0 |
@kepikoi - it looks like this is the root cause: #228 (sorry took me a bit to remember!) In V2, we have this issue where HTTP output through $return does not go through the same code path to create an http request. We couldn't change it in V2 because it is a breaking change (there are some weird but nice things you can do in V2 like returning a string and that will directly end up as the body). Recommendation is to either not use the $return binding or switch to V3. One thing we could do in V2 is to emit a warning if we see someone using cookies + $return. So I'll keep this issue open! |
Looks like this was already fixed in v3. Only thing left is this:
But since v2 is pretty old at this point, I will go ahead and close. |
Using
node
runtime it is now possible to send multiple cookies like documented here Azure/azure-functions-host#2737E.g.:
But it doesn't work using the
$return
binding:The text was updated successfully, but these errors were encountered: