📜  flask 获取用户的 ip - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:11.440000             🧑  作者: Mango

代码示例3
from flask import request
from flask import jsonify

@app.route("/get_my_ip", methods=["GET"])
def get_my_ip():
    return jsonify({'ip': request.remote_addr}), 200