Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/cli-kit/src/private/node/api/headers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ describe('common API methods', () => {
authorization: 'token',
'Content-Type': 'application/json',
'X-Shopify-Access-Token': 'token',
Cookie: 'session=123',
'Set-Cookie': 'session=456',
}

// When
Expand Down
2 changes: 1 addition & 1 deletion packages/cli-kit/src/private/node/api/headers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class GraphQLClientError extends RequestClientError {
*/
export function sanitizedHeadersOutput(headers: Record<string, string>): string {
const sanitized: Record<string, string> = {}
const keywords = ['token', 'authorization', 'subject_token']
const keywords = ['token', 'authorization', 'subject_token', 'cookie']
Object.keys(headers).forEach((header) => {
if (keywords.find((keyword) => header.toLocaleLowerCase().includes(keyword)) === undefined) {
sanitized[header] = headers[header]!
Expand Down
Loading