Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Properly handle prefix="" in CustomProvider()
It might be that an app could support either running behind a reverse proxy or directly. In the latter case, prefix would be "". This modifies CustomProvider to properly handle that case. Previously, CustomProvider() would apply this to prefix unconditionally: prefix = "/" + strings.Trim(prefix, "/") Starting with prefix = "", prefix would become "/", making appWASM "//web/app.wasm". A browser that acted on such a path might erroneously load, e.g., "http://web/app.wasm". Now, CustomProvider() only trims and concatenates when prefix != "". Signed-off-by: W. Michael Petullo <mike@flyn.org>
- Loading branch information