I'm tring to get the client's ipv6 (if present) or ipv4 address whenever my api end point is hit. Here's the code:
from flask import request
from flask import jsonify
@app.route("/ip", methods=["GET"])
def ip():
return jsonify({'ip': request.remote_addr})
But currently, only the ipv4 address of the client is returned. Is it possible to get the ipv6 address of the client ?