Is there a way to determine what the path was requested to the server, including if it included a question mark? The application
from flask import Flask, Respon
In addition to the fields you have already mentioned, Values in 'environ' field might be useful in your case:
def root():
return Response(
f'raw_uri:{request.environ["RAW_URI"]} '
f'request_uri:{request.environ["REQUEST_URI"]}'
)
Input:
http://localhost:8081/?
Output:
raw_uri:/?
request_uri:/?
Input:
http://localhost:8081/
Output:
raw_uri:/
request_uri:/