Skip to content

Commit

Permalink
webhook: include Allow header in GET /webhook 405 response
Browse files Browse the repository at this point in the history
Co-Authored-By: dgw <dgw@technobabbl.es>
  • Loading branch information
HumorBaby and dgw committed Apr 13, 2019
1 parent 334ec7e commit fc8815a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sopel_modules/github/webhook.py
Expand Up @@ -169,7 +169,8 @@ def verify_request():
def show_hook_info():
if sopel_instance.config.github.debug_mode:
return 'Listening for webhook connections!'
return bottle.abort(405) # 405 Method Not Allowed; this route is only useful for testing.
# bottle.abort() == raise HTTPError(); manually raising HTTPError allows passing extra headers
raise bottle.HTTPError(405, Allow='POST') # 405 Method Not Allowed; this route is only useful for testing.


@bottle.post("/webhook")
Expand Down

0 comments on commit fc8815a

Please sign in to comment.