sytone / obsidian-remote

Run Obsidian.md in a browser via a docker container.
MIT License
1.42k stars 138 forks source link

Obsidian does not load behind reverse proxy #6

Closed j21w91 closed 2 years ago

j21w91 commented 2 years ago

I have set up NGINX to point to my this docker but I am getting a white screen.

I can see the little black button that allows me to click full screen, keyboard, etc.

But other than that, nothing. Is there some headers I need to set or something?

sytone commented 2 years ago

You should not need to have anything as it is an un-authenticated session. I will give it a go in the next few days to see if I can reproduce. Is this with v0.0.2?

sytone commented 2 years ago

You need to have websocket support on as the connection from the browser to the server is via websockets.

Adding this should fix it.

    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $http_connection;
    proxy_http_version 1.1;

Reference: https://nginx.org/en/docs/http/websocket.html

j21w91 commented 2 years ago

Boom. You hero! That solved it.

I actually use Nginx proxy manager and it has a “web sockets support” button, so just toggled that on and it works.

Going to out authelia over the top of this. Been looking for a way to use obsidian at work and this has just solved it. Thanks for your work!