-
Notifications
You must be signed in to change notification settings - Fork 43
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
runserver doesn't respect host setting #449
Comments
I'll take a closer look later, but the documentation just says that it is the host to access the static files: Maybe you're confusing it with the |
It also doesn’t change the host of the static server
|
OK, so the setting appears to get used here: To change the host used for the static server. I'm not really sure how well that works, or if it's worth changing it. We could probably add a new option for setting the binding address, or maybe repurpose this option. Feel free to give it a go. |
aiohttp-devtools version: 1.0.post0
aiohttp version: 3.8.1
python version: 3.10
Platform: mac
Issue Summary
adev runserver
doesn't respect the host setting - it always uses0.0.0.0
which means the server can be always accused from any computer on the network.Steps to reproduce
create a file
test.py
and run command
adev runserver test.py --host localhost
As expected we can access the page from the computer it is running on. However it is also possible to access the page from any other computer on the network, which (according to my understanding) shouldn't be possible with this host setting.
If this is indeed and issue then I suspect its because of using
HOST
instead ofhost
here:aiohttp-devtools/aiohttp_devtools/runserver/main.py
Line 65 in 3e517d2
If it is not an issue how could I restrict the dev server to only be accessible from localhost?
The text was updated successfully, but these errors were encountered: