Skip to content

Ensure requests use cors mode on browsers #409

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

Merged
merged 1 commit into from
Jul 15, 2024
Merged

Conversation

Fryuni
Copy link
Member

@Fryuni Fryuni commented Jul 15, 2024

Summary

Change ContentFetcher and Evaluator to ensure cors request mode when running on a browser. This is necessary for requests to include the Origin header1 (and therefore participate correctly on the CORS protocol) without relying on the security configurations of the surrounding script/page.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented on my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Footnotes

  1. https://fetch.spec.whatwg.org/#origin-header

@Fryuni Fryuni added the bug Something isn't working label Jul 15, 2024
@Fryuni Fryuni requested a review from marcospassos July 15, 2024 22:51
@Fryuni Fryuni self-assigned this Jul 15, 2024
Copy link

codeclimate bot commented Jul 15, 2024

Code Climate has analyzed commit 0ee85e9 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 99.9% (0.0% change).

View more on Code Climate.

@marcospassos marcospassos merged commit 3bfda51 into master Jul 15, 2024
6 checks passed
@marcospassos marcospassos deleted the fix/fetch-mode branch July 15, 2024 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants