Post requests aren't received
Morning guys, i have a really bad issue that keeps me away from using my app. I have a flask web server with a callback function that needs to process a post request and send message in a telegram chat. The problem is that the webserver receives get requests, but post requests made by another website arent received and i cant see them not in the logs, neither in the chat. Do you know maybe what can the problem be? On localhost it works just fine, but when i deploy it this problem appears... The post requests are made from pubsubhubbub with xml content, do you know what might be the problem? Thank you
32 Replies
Project ID:
d43e2a8d-01ab-49aa-94c5-d7cd0c9058d6
d43e2a8d-01ab-49aa-94c5-d7cd0c9058d6
up
up
the bumps are not needed, this is community help and people will come to help if and when they want
with that said, make sure you are using https when calling your endpoints
Another website is calling the post endpoint, so i believe it uses https
please make sure the requests are made as https
* Serving Flask app 'callback_server'
* Debug mode: off
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on all addresses (0.0.0.0)
* Running on https://127.0.0.1:443
* Running on https://172.17.1.24:443
Press CTRL+C to quit
Now the server doesnt respond to the endpoint at all
i did not say to run the server in https mode
you need to be using gunicorn
[2023-07-28 16:34:04 +0000] [1] [INFO] Starting gunicorn 21.2.0
[2023-07-28 16:34:04 +0000] [1] [INFO] Listening at: http://0.0.0.0:443 (1)
[2023-07-28 16:34:04 +0000] [1] [INFO] Using worker: sync
[2023-07-28 16:34:04 +0000] [7] [INFO] Booting worker with pid: 7
Still nothing
server started but it doesnt register any calls
do not specify a port in the gunicorn start command
this is the starting command gunicorn --bind 0.0.0.0 callback_server:gunicorn_app
Now the server doesnt run at all,
[2023-07-28 16:38:24 +0000] [1] [INFO] Starting gunicorn 21.2.0
[2023-07-28 16:38:24 +0000] [1] [INFO] Listening at: http://0.0.0.0:8000/ (1)
[2023-07-28 16:38:24 +0000] [1] [INFO] Using worker: sync
[2023-07-28 16:38:24 +0000] [7] [INFO] Booting worker with pid: 7
this is the starting command gunicorn --bind 0.0.0.0 callback_server:gunicorn_app
remove the bind
and remove the PORT from your service variables
only --bind or along with the ip?
yes 0.0.0.0 too
[2023-07-28 16:43:33 +0000] [1] [INFO] Starting gunicorn 21.2.0
[2023-07-28 16:43:33 +0000] [1] [INFO] Listening at: http://0.0.0.0:7270 (1)
[2023-07-28 16:43:33 +0000] [1] [INFO] Using worker: sync
[2023-07-28 16:43:33 +0000] [7] [INFO] Booting worker with pid: 7
Running but doesnt return anything
Not for get neither for post
make sure you are calling the domain with https