dioxus icon indicating copy to clipboard operation
dioxus copied to clipboard

Fetch relative assets from `base_path` instead of root when `base_path` is set

Open s1gtrap opened this issue 1 year ago • 0 comments

I also ran into #2285, and went ahead and had a look. Turns out #2381 fixed most of it, but I believe it needs a trailing / in order to serve assets correctly. Without a trailing /, assets that are relatively addressed will search in the root path instead of relative to the base_path, causing 404s as assets are (correctly) served from the base_path.

This seems as if it was the intended use of Router::nest as requests to /<base_path> are redirected to /<base_path>/ automatically.

The alternative would be to hardcode the base_path in the assets but I don't think this is a very intuitive approach.

s1gtrap avatar May 10 '24 14:05 s1gtrap