�
���g� � �P � d dl Z d dlmZ G d� d� � Z G d� de� � ZdS )� N)�get_static_filec �* � e Zd ZdZ dd�Zd� Zd� ZdS )�WSGIAppa� WSGI application middleware for Engine.IO.
This middleware dispatches traffic to an Engine.IO application. It can
also serve a list of static files to the client, or forward unrelated
HTTP traffic to another WSGI application.
:param engineio_app: The Engine.IO server. Must be an instance of the
``engineio.Server`` class.
:param wsgi_app: The WSGI app that receives all other traffic.
:param static_files: A dictionary with static file mapping rules. See the
documentation for details on this argument.
:param engineio_path: The endpoint where the Engine.IO application should
be installed. The default value is appropriate for
most cases.
Example usage::
import engineio
import eventlet
eio = engineio.Server()
app = engineio.WSGIApp(eio, static_files={
'/': {'content_type': 'text/html', 'filename': 'index.html'},
'/index.html': {'content_type': 'text/html',
'filename': 'index.html'},
})
eventlet.wsgi.server(eventlet.listen(('', 8000)), app)
N� engine.ioc �� � || _ || _ || _ | j � d� � sd| j z | _ | j � d� � s| xj dz
c_ |pi | _ d S )N�/)�engineio_app�wsgi_app�
engineio_path�
startswith�endswith�static_files)�selfr r
r r s �c/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/engineio/middleware.py�__init__zWSGIApp.__init__"