-2

I have been requested to do an app that communicates with another app, i am requested to open my app in the url: js-api.local.dev as this url is used for connecting my app with the other one, they communicate between each other , how can i make this possible?

rrorrolfo
  • 65
  • 1
  • 6

1 Answers1

0

Chrome and Firefox force .dev domains to HTTPS via preloaded HSTS and maybe other browsers do the same thing so you should use another tld sush as .test or .localhsot or you can try other solutions (e.g. https with self-signed certificates).

If you want to open your app with js-api.local.test for example:

  • Add 127.0.0.1 js-api.local.test to your hosts file
  • create a .env file in the root of your cra app and add: HOST=js-api.local.test

More info:
Chrome redirects .dev to https
How to stop Chrome from redirecting to HTTPS?
Chrome & Firefox now force .dev domains to HTTPS via preloaded HSTS
Create React App - Advanced Configuration

Fraction
  • 11,668
  • 5
  • 28
  • 48