python-eel/Eel

EEL behind a reverse proxy

Open

#329 ouverte le 21 juin 2020

Voir sur GitHub
 (2 commentaires) (1 réaction) (0 assignés)Python (570 forks)batch import
help wanted

Métriques du dépôt

Stars
 (5 980 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

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

Guide contributeur