EEL behind a reverse proxy
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
Hi @TheToto318, did you manage to solve this?
this is kind of old but, I got the same issue running behind a docker container solve it by running with host='0.0.0.0' as mentioned here https://bottlepy.org/docs/dev/deployment.html