Bypass CORS to fetch files when working with localhost

Published on May 24, 2023

1 min read

TOOLS

Sometime back I learned about opening files or directories using the open command from the CLI on a Mac. It's simple yet effective.

Another use case that I've been using it for is to open the current project when in localhost in the browser and bypass the CORS policy to fetch files that are also available locally.

open -a "Google Chrome Canary" --args --user-data-dir="/tmp/chrome_dev_test" --disable-web-security

The argument passed in the above command overrides the browser's default behavior.


More Posts

Browse all posts

Aman Mittal author

I'm a software developer and a technical writer. On this blog, I write about my learnings in software development and technical writing.

Currently, working as the documentation lead at 𝝠 Expo. Read more about me on the About page.


Copyright ©  2019-2024 Aman Mittal · All Rights Reserved.