
    IiJ                     4    S SK Jr  S\S\4S jrS\S\4S jrg)    )Requestrequestreturnc                     SU R                   ;   a  U R                   S   $ U R                  (       a  U R                  R                  (       d  gU R                  R                  $ )z
Returns the ip address for the current request (or 127.0.0.1 if none found)
 based on the X-Forwarded-For headers.
 Note that a more robust method for determining IP address of the client is
 provided by uvicorn's ProxyHeadersMiddleware.
X_FORWARDED_FOR	127.0.0.1)headersclienthostr   s    2/venv/lib/python3.13/site-packages/slowapi/util.py
get_ipaddrr      sF     GOO+011~~W^^%8%8~~"""    c                     U R                   (       a  U R                   R                  (       d  gU R                   R                  $ )zM
Returns the ip address for the current request (or 127.0.0.1 if none found)
r   )r
   r   r   s    r   get_remote_addressr      s*     >>!4!4>>r   N)starlette.requestsr   strr   r    r   r   <module>r      s.    &# #C #  C r   