Error 405

Nnuviobco5/12/2023
Subject: 405 Error when making a POST request to '/reset_password/<token>' endpoint

Dear Railway Support Team,

I have been developing a web application deployed on your platform and I'm currently facing an issue related to an HTTP 405 error.

The error happens when I try to make a POST request to the '/reset_password/<token>' endpoint. This endpoint is configured in my Flask application to accept both GET and POST requests, however, when a POST request is made, I receive a 405 error.

What's puzzling is that other routes in my application that also use the POST method are working as expected, it's only the '/reset_password/<token>' endpoint that is causing this issue.

Here is how I have configured the route:

python
@app.route('/reset_password/<token>', methods=['GET', 'POST'])
def reset_password(token):
# Implementation details

The error message I'm seeing is:
Request URL: https://jaguarchat.up.railway.app/reset_password/
Request Method: POST
Status Code: 405
Remote Address: 104.196.232.237:443
Referrer Policy: strict-origin-when-cross-origin
Allow: GET, OPTIONS, HEAD
I have tried troubleshooting this issue from various angles and tested the application on different computers with the same result. I have also confirmed that the HTML form associated with this request is correctly set to use the POST method.

Any assistance or insight you can provide into this issue would be greatly appreciated.

Thank you for your time and assistance.

Best regards,
[jaguarchat.org]
Bbrody5/12/2023
Request URL: https://jaguarchat.up.railway.app/reset_password/
there is no token in this request
Nnuviobco5/12/2023
my project id: a87bac13-f159-4c55-b82e-8b2a1eb31be5
Bbrody5/12/2023
is this a flask app?
Nnuviobco5/12/2023
yes
Bbrody5/12/2023
have you tried testing this with postman?
Nnuviobco5/12/2023
I am using Mailgun
Bbrody5/12/2023
^
Nnuviobco5/12/2023
Ok I gonna try, if I have some Issue, I tell you. Thank you!
Bbrody5/12/2023
this code works perfecly fine on railway
@app.route('/reset_password/<token>', methods=['GET', 'POST'])
def reset_password(token):
    return token

https://test-service2.up.railway.app/reset_password/00e70b86-0d5d-46d2-902c-a262f565866a
your issue would be with mailgun, not railway