-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Improve localhost checking in checkHost
#903
Comments
This would unfortunately defeat the newly added security measure. An attacker would just make sure the string "localhost" was present (eg |
if #899 is accepted and merged you'll be able to just add your domain to the allowed hosts!
OR if you needed subdomains other than
mimicking django's ALLOWED_HOSTS, an |
just read the last paragraph of your issue and see you are not depending on |
The recent versions of this module have extended support for |
What is the current behavior?
In 0.16.4, webpack-dev-server introduced host checking #887 . Even though
localhost
and127.0.0.1
is by default exempt from host checking, it still brings trouble to local development.In our team, our local environment host is
localhost.xxxx.com
to share cookie with domainxxxx.com
. But,localhost.xxxx.com
is not taken as localhost.What is the expected behavior?
It would be better to have localhost checking with regex.
Just change
webpack-dev-server/lib/Server.js
Line 412 in 2957853
I know there is a
disableHostCheck
option to web-dev-server. However, we're not directly depending onwebpack-dev-server
, but onreact-server
which controls options towebpack-dev-server
. So, an improved localhost checking is preferred.Thanks.
The text was updated successfully, but these errors were encountered: