Allow root URL path to be configured via environment variable
Hey, thanks for that - would love to see it implemented.
My use case would be to use reverse proxy (e.g. via nginx) in order to have clean url in my local self-hosted home server
I'm sure you've already considered this but my workaround suggestion would be to use a different sub-domain e.g. flatnotes.example.com. This is what I do.
I'm sure you've already considered this but my workaround suggestion would be to use a different sub-domain e.g.
flatnotes.example.com. This is what I do.
Right, this is a way, but currently I'm using notatnion like: "myserver.local/jenkins, myserver.local/portainer" etc.
Thanks!
I went insane trying to make this work since my setup also has each service running on a subpath reverse proxy.
This seems to be a FastAPI-related problem however even setting up the root-path variable correctly doesn't seem to be enough, I tried many ways to setup both fastapi's root path and my nginx configuation as suggested here and here but to no avail.
I hope someone can get this working one day 🙏
I'm pleased to say that I now have a working build that supports a custom path prefix 🎉. I would appreciate some beta testers if anyone would like to give it a go. You just need to use the docker tag dullage/flatnotes:custom-path-prefix and set the FLATNOTES_PATH_PREFIX environment variable to something like /flatnotes.
⚠️Note: New image attachments will embed a URL that works even if the path prefix is changed. Unfortunately, existing attachment URLs will need to be manually updated (but only for existing users that want to use a path prefix). You'll need to change, for example, /attachments/foo.png to attachments/foo.png.
See this comment on a duplicate suggestion for more detail.
Now available in 5.1.0.