File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ {
2+ "github_ips_only" : false ,
3+ "enforce_secret" : " 7dff20e9837781425f1f2ffeee8653cbd78c1dfd401e841d" ,
4+ "return_scripts_info" : true
5+ }
Original file line number Diff line number Diff line change 3535application = Flask (__name__ )
3636
3737
38- @application .route ('/' , methods = ['GET' , 'POST' ])
38+ @application .route ('/gh_webhook/ ' , methods = ['GET' , 'POST' ])
3939def index ():
4040 """
4141 Main WSGI application entry.
@@ -79,7 +79,7 @@ def index():
7979 abort (501 )
8080
8181 # HMAC requires the key to be bytes, but data is string
82- mac = hmac .new (str (secret ), msg = request .data , digestmod = ' sha1' )
82+ mac = hmac .new (str (secret ), msg = request .data , digestmod = sha1 )
8383
8484 # Python prior to 2.7.7 does not have hmac.compare_digest
8585 if hexversion >= 0x020707F0 :
@@ -200,4 +200,4 @@ def index():
200200
201201
202202if __name__ == '__main__' :
203- application .run (debug = True , host = '0 .0.0.0' )
203+ application .run (debug = True , host = '127 .0.0.1' , port = 7777 )
Original file line number Diff line number Diff line change 11from webhooks import application
22
33if __name__ == "__main__" :
4- application .run (debug = False , host = '0 .0.0.0 ' )
4+ application .run (debug = True , host = '127 .0.0.1 ' )
You can’t perform that action at this time.
0 commit comments