zadam / trilium

Build your personal knowledge base with Trilium Notes
GNU Affero General Public License v3.0
27.2k stars 1.9k forks source link

(Bug report) Tree dont refresh with HTTPS #2593

Closed Xfxa0 closed 2 years ago

Xfxa0 commented 2 years ago

Trilium Version

0.50

What operating system are you using?

Ubuntu

What is your setup?

Server access only

Operating System Version

Firefox/Edge/Safari (Windows 11, Windows 10, iOS)

Description

Hi,

I configured a reverse proxy to have HTTPS access to trilium. However when I access trilium from HTTPS, the notes tree does not update and I have to refresh (F5) the page to view the new pages or to be able to view their new name.

I don't have this problem when I access trilium in HTTP

Edit : I have this error in the console logs "Lost websocket connection to the backend. If you keep having this issue repeatedly, you might want to check your reverse proxy (nginx, apache) configuration and allow/unblock WebSocket. ws.js:208:17"

zadam commented 2 years ago

This is a symptom of non-functioning WebSocket. You need to configure your reverse proxy to allow WebSocket traffic.

Xfxa0 commented 2 years ago

Hi Zadam,

Thank you for your quick response.

I have this in my .conf for apache2:

 RewriteEngine On
RewriteCond %{HTTP:Connection} Upgrade [NC]
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteRule /(.*) ws://localhost:56561/$1 [P,L]

This is not enough to authorize the websocket?

Xfxa0 commented 2 years ago

Ok I found my mistake, I didnt enable proxy_wstunnel.

It works now !

Thank you for your help and sorry for inconvenience

Thank you for your great application !