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 e93186f commit dc7c9e2Copy full SHA for dc7c9e2
README.rst
@@ -9,6 +9,7 @@ Install
9
=======
10
11
::
12
+
13
git clone [email protected]:carlos-jenkins/python-github-webhooks.git
14
cd python-github-webhooks
15
config.json
@@ -1,5 +1,5 @@
1
{
2
- "github_ips_only": false,
+ "github_ips_only": true,
3
"enforce_secret": "",
4
"return_scripts_info": true
5
}
webhooks.py
@@ -56,7 +56,9 @@ def index():
56
57
# Allow Github IPs only
58
if config.get('github_ips_only', True):
59
- src_ip = ip_address(request.remote_addr)
+ src_ip = ip_address(
60
+ u'{}'.format(request.remote_addr) # Fix stupid ipaddress issue
61
+ )
62
for valid_ip in whitelist:
63
if src_ip in ip_network(valid_ip):
64
break
0 commit comments