We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 06e5c92 commit 2de5778Copy full SHA for 2de5778
webhooks.py
@@ -44,8 +44,6 @@ def index():
44
path = normpath(abspath(dirname(__file__)))
45
hooks = join(path, 'hooks')
46
47
- whitelist = requests.get('https://api.github.com/meta').json()['hooks']
48
-
49
# Only POST is implemented
50
if request.method != 'POST':
51
abort(501)
@@ -59,6 +57,8 @@ def index():
59
57
src_ip = ip_address(
60
58
u'{}'.format(request.remote_addr) # Fix stupid ipaddress issue
61
)
+ whitelist = requests.get('https://api.github.com/meta').json()['hooks']
+
62
for valid_ip in whitelist:
63
if src_ip in ip_network(valid_ip):
64
break
0 commit comments