Answers for "flask check ip adress from device"

2

get client ip flask

request.environ['HTTP_X_FORWARDED_FOR']
Posted by: Guest on June-23-2020
0

flask get ip of user

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
Posted by: Guest on January-01-2021

Python Answers by Framework

Browse Popular Code Answers by Language