flask-deploy
flask-deploy copied to clipboard
Cannot using Method POST when use external IP address.
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 :
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.
Can you look at the DO logs?