bug: Access to script at been blocked by CORS policy

Open
#26 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Quiet
Tech stack
typescript
Domain
tooling

Research direction

Reproduce the issue in the Requestly Chrome extension by creating a redirect rule for a script and reloading the page. Start at the redirect-rule handling for the reported assets/reporting.js to trace the localhost/reportinglocalhost.js request; done means the redirect no longer triggers the reported CORS denial without disabling Chrome security.

Written by the indexing model from the issue text.

Description

Describe your issue?

I've seen this issue working locally with the Requestly extension in Chrome.

Access to script at been blocked by CORS policy. Permission was denied for this request to access http://localhost/reportinglocalhost.js redirected from https://djm113gw5h5.cloudfront.net/assets/reporting.js) from origin https://ww.<my-site>.net

It's almost as if Chromium is tightening up this rule somehow.

For what it's worth I can circumvent it by launching chrome like this, but it feels wrong:

open -na "Google Chrome" --args \
  --user-data-dir="/tmp/chrome-dev" \
  --disable-web-security \
  --disable-site-isolation-trials
Repro steps
  1. Use Requestly in Chrome
  2. Set up a redirect rule
  3. Reload
What Requestly tool were you using?
  • Extension
  • Desktop-App
  • Android SDK
  • Selenium
Your Environment

latest

Requestly Version

latest

Error screenshot

No response

Dominant language
TypeScript
Stars
87
Forks
23
Avg merge
14h
Merged PRs (30d)
3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from requestly/interceptor

All issues in requestly/interceptor

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.