-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
--allow-hosts list is normalized but connection host is not #246
Comments
This issue is stale because it has been open for 90 days with no activity. |
#275 is still awaiting review/merge, hoping this can get some attention 🤞 |
Why is this PR still on hold? |
Hey guys, that's NOT me in the previous comment 😬. |
#275 merged and release in 0.7.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I'm trying to block connections form everywhere except for localhost so that VS Code can still communicate with pytest. While working on this I've stumbled upon an issue where I noticed that if I use the arg
--allow-hosts=localhost
, it gets translated into127.0.0.1
in thenormalize_allowed_hosts
function. This would be fine except thehost_from_connect_args
function does not normalize the host, which unfortunately means that code attempting to connect to "localhost" will always be blocked, even when attempting to allow it.I've patched my local copy to work like this, and it's having the desired effect (note line 3):
Not sure if that's the ideal long-term solution but I wanted to present a working option. Thanks for maintaining this, let me know if you'd like me to create a PR with the change (or a similar one).
The text was updated successfully, but these errors were encountered: