Skip to content

Conversation

@astandrik
Copy link
Collaborator

@astandrik astandrik commented Jun 3, 2025

Closes #2360

CI Results

Test Status: ⚠️ FLAKY

📊 Full Report

Total Passed Failed Flaky Skipped
318 317 0 1 0

😟 No changes in tests. 😕

Bundle Size: ✅

Current: 83.65 MB | Main: 83.65 MB
Diff: +0.21 KB (0.00%)

✅ Bundle size unchanged.

ℹ️ CI Information
  • Test recordings for failed tests are available in the full report.
  • Bundle size is measured for the entire 'dist' directory.
  • 📊 indicates links to detailed reports.
  • 🔺 indicates increase, 🔽 decrease, and ✅ no change in bundle size.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request fixes issues with sending credentials for multipart requests across origins by introducing explicit handling of the credentials flag in the streaming API.

  • Added a withCredentials field to the StreamingAPI class.
  • Updated the constructor to initialize withCredentials from options.config.
  • Modified the streamQuery method to include a credentials property based on withCredentials.

@astandrik astandrik requested a review from Copilot June 3, 2025 16:01
@astandrik astandrik added 🐞 type/bug Something isn't working prio/high size/s labels Jun 3, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enables sending credentials on cross-origin multipart streaming requests by honoring the withCredentials flag from the Axios wrapper options.

  • Import AxiosWrapperOptions and store withCredentials in StreamingAPI
  • Pass the appropriate credentials value (include or same-origin) in the fetch options
Comments suppressed due to low confidence (1)

src/services/api/streaming.ts:76

  • Add unit tests to verify that the credentials option is correctly set to 'include' when withCredentials is true and 'same-origin' when false or undefined.
credentials: this.withCredentials ? 'include' : 'same-origin',

artemmufazalov
artemmufazalov previously approved these changes Jun 3, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes cross-origin behavior for multipart requests by dynamically setting the credentials field based on axios default settings.

  • Injects a credentials option into the fetch request in the StreamingAPI class.
  • Ensures that the request uses 'include' when axios is configured with withCredentials.

@astandrik astandrik added this pull request to the merge queue Jun 3, 2025
Merged via the queue into main with commit 97dfc75 Jun 3, 2025
7 checks passed
@astandrik astandrik deleted the astandrik.2360 branch June 3, 2025 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: credentials for multipart for cross-origin

3 participants