From 7c640ac32e7a4fd3d0768f6722701767a69d9136 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxi=20Quo=C3=9F?= Date: Thu, 4 Sep 2025 23:12:50 +0200 Subject: [PATCH] feat: support for sub path hosting --- README.md | 15 +++++++++++++++ frontend/src/lib/components/Navbar.svelte | 20 ++++++++++---------- frontend/src/lib/stores/pocketbase.ts | 3 ++- frontend/src/routes/+layout.svelte | 6 +++--- frontend/src/routes/account/+page.svelte | 6 +++--- frontend/src/routes/device/new/+page.svelte | 4 ++-- frontend/src/routes/settings/+page.svelte | 4 ++-- frontend/src/routes/users/+page.svelte | 8 ++++---- 8 files changed, 41 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 1b31c22c..eee0355c 100644 --- a/README.md +++ b/README.md @@ -116,6 +116,21 @@ upsnap.example.com { } ``` +### Run in sub path + +You can run UpSnap on a different path than `/`, e.g. `/upsnap-sub-path/`. To do this in caddy, set the following: + +``` +http://localhost:8091 { + handle /upsnap-sub-path/* { + uri strip_prefix /upsnap-sub-path + reverse_proxy localhost:8090 + } +} +``` + +Paths must end with a trailing `/`. + ## 🐧 Install from the [AUR](https://aur.archlinux.org/packages/upsnap-bin) ```bash diff --git a/frontend/src/lib/components/Navbar.svelte b/frontend/src/lib/components/Navbar.svelte index ea00cd22..5c29ac45 100644 --- a/frontend/src/lib/components/Navbar.svelte +++ b/frontend/src/lib/components/Navbar.svelte @@ -1,7 +1,7 @@