python-eel/Eel

EEL behind a reverse proxy

Open

#329 opened on 2020年6月21日

GitHub で見る
 (2 comments) (1 reaction) (0 assignees)Python (570 forks)batch import
help wanted

Repository metrics

Stars
 (5,980 stars)
PR merge metrics
 (30d に merged PR はありません)

説明

Hello, I got eel working on my local network and I would like to acces my app from the internet behind my NGINX reverse proxy. I have this error :

Traceback (most recent call last): File "C:\Program Files\Python38\lib\site-packages\bottle.py", line 865, in handle return route.call(**args) File "C:\Program Files\Python38\lib\site-packages\bottle.py", line 1745, in wrapper rv = callback(*a, **ka) File "C:\Program Files\Python38\lib\site-packages\bottle_websocket\plugin.py", line 5, in wrapper callback(request.environ.get('wsgi.websocket'), *args, **kwargs) File "C:\Program Files\Python38\lib\site-packages\eel_init.py", line 225, in _websocket msg = ws.receive() AttributeError: 'NoneType' object has no attribute 'receive'

I read the bottlepy faq (https://bottlepy.org/docs/0.12/faq.html) and seen this fonction that could possibly resolve my issue :

def fix_environ_middleware(app): def fixed_app(environ, start_response): environ['wsgi.url_scheme'] = 'https' environ['HTTP_X_FORWARDED_HOST'] = 'example.com' return app(environ, start_response) return https_app app = bottle.default_app() app.wsgi = fix_environ_middleware(app.wsgi)

I don't know how to use it, I heard about a WSGI server that I have to use to do what I want but I don't know if it's possible to do that in docker.

If someone can help me with that...

Regards, Thomas

コントリビューターガイド