oranda icon indicating copy to clipboard operation
oranda copied to clipboard

Using `path_prefix` leads to 404 errors when fetching asset during local dev

Open pomdtr opened this issue 2 years ago • 3 comments

image

pomdtr avatar Apr 16 '23 17:04 pomdtr

yeah this is a vaguely known issue (see also #184 #227) - it's from some fundamental limitations of axum, the library we are using to do the server.

https://github.com/axodotdev/oranda/blob/main/src/commands/serve.rs#L78 this is how i'm handling it today which is very manual and will be difficult for custom assets. will need to figure out a different solution.

a workaround is that while developing, you can remove the path prefix and it should work perfectly. then add the path prefix for deploy. not ideal, i know, but should help unblock.

ashleygwilliams avatar Apr 17 '23 16:04 ashleygwilliams

a workaround is that while developing, you can remove the path prefix and it should work perfectly. then add the path prefix for deploy. not ideal, i know, but should help unblock.

Maybe path_prefix should be ignored when running oranda dev ? I don't really care if my app is running on localhost:7979 or localhost:7979/sunbeam

pomdtr avatar Apr 17 '23 16:04 pomdtr

short-term plan: disabled path-prefix in serve environments to avoid this issue

Gankra avatar Jun 22 '23 15:06 Gankra