I am creating a normal HTTP server via flask in python. This program is supposed to run on a normal computer. This web server would then be accessed by a mobile app and some critical data would be exchanged.
The question is now, how to make the connection secure. Piece of code:
from flask import Flask, request
app = Flask(__name__)
@app.route('/', methods=['GET'])
def result():
some_critical_data = request.form['data']
return 'Some other critical data'
if __name__ == '__main__':
app.run(host='0.0.0.0', port='8071', debug=True)