
    iJ                     2    d dl mZ dedefdZdedefdZdS )    )Requestrequestreturnc                 p    d| j         v r| j         d         S | j        r| j        j        sdS | j        j        S )a  
    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    \/var/www/html/crypto-mining-system/backend/venv/lib/python3.11/site-packages/slowapi/util.py
get_ipaddrr      sE     GO++011~ 	W^%8 	;~""    c                 D    | j         r| j         j        sdS | j         j        S )zU
    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 {>r   N)starlette.requestsr   strr   r    r   r   <module>r      se    & & & & & &# #C # # # #  C      r   