非淡泊无以明志,非宁静无以致远。这篇文章主要讲述create-react-app之Invalid Host Header相关的知识,希望能为你提供帮助。
【create-react-app之Invalid Host Header】
1、When you enable the `proxy` option, you opt into a more strict set of host checks. This is necessary because leaving the backend open to remote hosts makes your computer vulnerable to DNS rebinding attacks.
【create-react-app之Invalid Host Header】you will 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.development` 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 having 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
推荐阅读
- 我的Android Studio 优化之路
- 使用Android的硬件缩放技术优化执行效率
- android-调用系统的ContentPrivder获取单张图片实现剪切做头像及源代码下载
- android动画具体解释六 XML中定义动画
- Android学习——控件ListView的使用
- 关于Android滑动冲突的解决方法
- android 自己定义水平和圆形progressbar 仅仅定义一些style就能够
- mongodb的cappedCollection集合
- 手把手教你_怎么找android应用的包名和启动activity