python-eel/Eel

EEL behind a reverse proxy

Open

#329 aperta il 21 giu 2020

Vedi su GitHub
 (2 commenti) (1 reazione) (0 assegnatari)Python (570 fork)batch import
help wanted

Metriche repository

Star
 (5980 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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

Guida contributor