silverbulletmd / silverbullet

The hackable notebook
https://silverbullet.md
MIT License
2.04k stars 141 forks source link

CORS errors #809

Open mortimus1987 opened 3 months ago

mortimus1987 commented 3 months ago

Running Silverbullet in docker, behind traefik reverse proxy and using Authentik for proxy-auth. I have the endpoints for the manifest, icon, and service worker exempted from the authentication requirement (adapted the authelia instructions to traefik).

This works perfectly when I first connect, and so I've installed Silverbullet as a PWA on my android phone and my Chromebook. However, after 24 hours I think the auth token from Authentik expires and the app stops working. I can see in chrome dev tools the service worker trying to make requests for the index, but receives a redirect from notes.mydomain.com to login.mydomain.com. This then throws a CORS error.

Im not an expert, I know only enough to be dangerous, but I suspect that this may be the cause of some of the other authentication issues that people with proxies are experiencing (such as #804).