Create-react-app's Invalid Host Header

Source: Internet
Author: User

"Create-react-app Invalid Host Header"

1. When you enable the ' Proxy ' option, you opt-in to a more strict set of host checks. This was necessary because leaving the backend open to remote hosts makes your computer vulnerable to DNS rebinding attacks .

You'll see this error in the browser after enabling the ' Proxy ' option:

>invalid Host Header 2, to work around it, you can specify your public development Host in a file called '. Env.developme NT ' in the root of your project: ' host=mypublicdevhost.com '
If You restart the development server now and load the app from the specified host, it should work. 3, if you are still have issues or If you ' re using a more exotic environment like a cloud editor, you can bypass the host  Check completely by adding a line to '. Env.development.local '. Dangerously_disable_host_check=true

Create-react-app's Invalid Host Header

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.