Skip to content

[BUG] Reloading /devices/[id] page failes when using sub path hosting #1711

Description

@seriousm4x

The bug

When hosting upsnap with a custom sub path (such as /upsnap-sub-path/), reloading the page on route /device/[id] will fail because sveltekit resolves to the wrong asset paths.

  • Now: "http://localhost:8091/upsnap-sub-path/device/z5nh29145ybca3q/_app/immutable/chunks/C2HHbHNx.js"
  • Correct: "http://localhost:8091/upsnap-sub-path/_app/immutable/chunks/C2HHbHNx.js"

Probably related: sveltejs/kit#9569

The OS that UpSnap is running on

any

Version of UpSnap

any

Your docker-compose.yml content

not relevant

Reproduction steps

1. Run upsnap
2. Use reverse proxy as specified in https://github.com/seriousm4x/UpSnap?tab=readme-ov-file#run-in-sub-path
3. Edit a device or go to page `/devices/some-device-id`
4. Reload the page
...

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions