HTTPretty icon indicating copy to clipboard operation
HTTPretty copied to clipboard

Add whitelist feature #303

Open dapicester opened this issue 4 years ago • 6 comments

Allow a whitelist of addresses to access the network. Pass a list of tuples (host, port) as whitelist argument.

whitelist = [
  ('localhost', 1234),
  ('127.0.0.1', 8080),
]
httpretty.enable(allow_net_connect=False, whitelist=whitelist)
# ...

dapicester avatar Nov 30 '21 03:11 dapicester

@gabrielfalcao, can we merge this one?

leikoilja avatar Aug 23 '23 13:08 leikoilja

@gabrielfalcao? :) i see you liked the commend above, but can we merge it? 😅

leikoilja avatar Sep 14 '23 05:09 leikoilja

@gabrielfalcao Can this be merged now? would really help me if this would be available.

t-pohl avatar Oct 29 '23 18:10 t-pohl

Waiting for this to be merged, you can directly use my fork with pip or poetry.

dapicester avatar Nov 13 '23 07:11 dapicester

Waiting for this to be merged, you can directly use my fork with pip or poetry.

@dapicester, which fork are you talking about? https://github.com/dapicester/HTTPretty is 3 commits behind httpretty original source and does not have whitelisting functionality merged 🤔

leikoilja avatar Nov 13 '23 09:11 leikoilja

@leikoilja you should use the feature/whitelist branch, not main.

dapicester avatar Nov 23 '23 04:11 dapicester