Skip to content

Commit

Permalink
Fix the path of the webhook URL
Browse files Browse the repository at this point in the history
On deploy I encountered a problem: without the trailing slash
Nginx responses with 304 status code and doesn't proxy requests.
  • Loading branch information
Leonid Kozarin committed Feb 25, 2023
1 parent f1ea3d8 commit b523c1e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ app/data/config.py
app/data/currates_conf.py
log.txt
messages.db
currates.db
currates.db.*
4 changes: 2 additions & 2 deletions app/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ def chosen_inline_result_callback(chosen_result: ChosenInlineResult) -> None:
loop.run_until_complete(bot.delete_webhook())
bot.run(debug=True)
else:
webhook_future = bot.set_webhook(f"https://{HOST}:{SERVER_PORT}/{NAME}")
webhook_future = bot.set_webhook(f"https://{HOST}:{SERVER_PORT}/{NAME}/")
loop.run_until_complete(webhook_future)
app = bot.create_webhook_app(f"/{NAME}", loop)
app = bot.create_webhook_app(f"/{NAME}/", loop)
os.umask(0o137) # rw-r----- for the unix socket
web.run_app(app, path=UNIX_SOCKET, loop=loop)

0 comments on commit b523c1e

Please sign in to comment.