Skip to content

Commit

Permalink
Revert "Include credentials with the data codec decode request (#1050)…
Browse files Browse the repository at this point in the history
…" (#1113)

This reverts commit c486661.
  • Loading branch information
rossedfort authored Feb 3, 2023
1 parent e2b15bd commit db0e2d3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 26 deletions.
1 change: 0 additions & 1 deletion src/lib/services/data-encoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ export async function convertPayloadsWithCodec({
const encoderResponse: Promise<Payloads> = fetch(endpoint + '/decode', {
headers,
method: 'POST',
credentials: 'include',
body: stringifyWithBigInt(payloads),
})
.then((r) => r.json())
Expand Down
25 changes: 0 additions & 25 deletions src/lib/utilities/decode-payload.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,31 +290,6 @@ describe('convertPayloadToJsonWithCodec', () => {
const dataConverterStatus = get(lastDataEncoderStatus);
expect(dataConverterStatus).toEqual('notRequested');
});
it('Should include credentials with the request for cookie based authentication of data converters', async () => {
const mockFetch = vi.fn(async () => {
return {
json: () => Promise.resolve({ payloads: [JsonPlainEncoded] }),
};
});

vi.stubGlobal('fetch', mockFetch);

const endpoint = 'http://localhost:1337';
await convertPayloadToJsonWithCodec({
attributes: parseWithBigInt(stringifyWithBigInt(workflowStartedEvent)),
namespace: 'default',
settings: {
codec: {
endpoint,
},
},
});

expect(mockFetch).toBeCalledWith(
expect.any(String),
expect.objectContaining({ credentials: 'include' }),
);
});
});

// Integration test
Expand Down

2 comments on commit db0e2d3

@vercel
Copy link

@vercel vercel bot commented on db0e2d3 Feb 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

holocene – ./

holocene-git-main.preview.thundergun.io
holocene.preview.thundergun.io

@vercel
Copy link

@vercel vercel bot commented on db0e2d3 Feb 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

ui – ./

ui.preview.thundergun.io
ui-lyart.vercel.app
ui-git-main.preview.thundergun.io

Please sign in to comment.