-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
When fetching a JSONL file from google storage using context.call (context.call(url, {method: "GET"})), it returns a 403 error because the signature does not match the request. The reason for this is that the header "Content-Type" is not expected. Setting the header to "undefined" or "null" does not work because the header isn't removed, it simply is assigned those values.
https://github.com/upstash/workflow-js/blob/main/src/qstash/headers.ts#L209
const contentType =
(callHeaders.get("content-type")
? callHeaders.get("content-type")
: this.userHeaders?.get("Content-Type")
? this.userHeaders.get("Content-Type")
: undefined) ?? DEFAULT_CONTENT_TYPE;
this.headers.rawHeaders["content-type"] = contentType;Headers should not be set when undefined.
Metadata
Metadata
Assignees
Labels
No labels