-
Notifications
You must be signed in to change notification settings - Fork 19
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
Handle custom header additions without requiring "Upstash-Forward-*" as a prefix. #55
Conversation
Also, if you're alright with the method here or have a cleaner way to do it I could add it to the following as well:
Probably could add in |
Looks good to me. Since we added failure callback recently this |
@ogzhanolguncu I haven't made an example yet but is this what you had in mind? |
Util is looking good. What I have in my mind is NodeJS Example adding an another example here where you don't need pass Maybe add another file here where you pass optinal headers to your callback. |
And, let's do this since we now have a easier way to handle this with thanks to |
About to add the others but I was looking through the API docs and couldn't find a place where you can add custom headers on topics. I tested a couple of ways but couldn't make it work - trying to see if it was just undocumented but that doesn't look to be the case. |
The PR is looking good right now. However, I have a concern: what if someone adds a new default header to QStash, and we overlook it or forget to include it here? Since it won't be in the predefined list, it could result in rendering the default header as null, potentially causing issues on the servers. |
At the end of the day the client is setting those headers after the util runs, if it was set on the original req, but changed the util up a bit to always ignore any header starting with |
This is looking much better. I'll test it myself too and merge it tomorrow. Good work 👍🏻 |
Description:
Currently, if you need to send custom headers to a schedule's destination you must prefix them manually with "Upstash-Forward-*". If you forget to add the prefix the headers will be ignored.
Also, deletion did not work until using new parseResponseAsJson property.
Updates
parseResponseAsJson: false,
to schedule deletion.Fixes #52