flask-deploy icon indicating copy to clipboard operation
flask-deploy copied to clipboard

Cannot using Method POST when use external IP address.

Open JackLe1991 opened this issue 8 years ago • 1 comments

Example:

languages = [{'name' : 'JavaScript'}, {'name' : 'Python'}, {'name' : 'Ruby'}] @app.route('/lang', methods=['POST']) def addOne(): language = {'name' : request.json['name']} languages.append(language) return jsonify({'languages' : languages})

Test: 171.232.89.174/lang Method: Post Headers: Content-Type:application/json body: Raw : {"name" : "HUydada"} Result :

500 Internal Server Error

Internal Server Error

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

But I test success on localhost IP.

JackLe1991 avatar Mar 24 '17 02:03 JackLe1991

Can you look at the DO logs?

mjhea0 avatar Mar 24 '17 12:03 mjhea0