Skip to content
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

Feature request: Launch browser into a unique origin #6357

Open
donavon opened this issue Feb 7, 2019 · 2 comments
Open

Feature request: Launch browser into a unique origin #6357

donavon opened this issue Feb 7, 2019 · 2 comments
Assignees
Milestone

Comments

@donavon
Copy link
Contributor

donavon commented Feb 7, 2019

Problem

npm start launches http://localhost:3000. If I've ever worked on a different app, its localStorage is now polluting my new app as they share an origin.

Solution

If HOST === 'localhost' then call opn with target set to http://{folder-name}.localhost:{port}

This way every app has a unique origin and this its own localStorage. I know that I can do this manually, but having CRA do it for me would be nice.

Thoughts?

This is related to #2578, but writing a script to get this to work seems like a lot of duplicated effort for each project

I also can't just set HOST as it won't bind to {folder-name}.localhost

@iansu
Copy link
Contributor

iansu commented Feb 8, 2019

This seems like a pretty good idea. It would probably solve some other caching related issues with cookies, service workers, etc. Want to make a PR?

@stale
Copy link

stale bot commented Mar 10, 2019

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

@stale stale bot added the stale label Mar 10, 2019
@iansu iansu self-assigned this Mar 10, 2019
@iansu iansu added this to the 3.0 milestone Mar 10, 2019
@iansu iansu added this to To do in v3 Mar 10, 2019
@iansu iansu removed this from To do in v3 Apr 3, 2019
@iansu iansu modified the milestones: 3.0, 3.x Apr 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants