You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Juno is expecting developers to use SSG / prerendering. For example, if an URL /marketplace/sales is requested and if there is no /marketplace/sales/index.html or /marketplace/sales.html available in the dapp, nothing is resolved and the URL ends in error.
Solution
Similar to Firebase, we can add an option "Configure as a single-page app (rewrite all urls to /index.html)?"
When set to true, if an URL /marketplace/sales would resolve no asset, then it should fallback to the root ./index.html.
Firebase
Firebase does more than "just" rewriting to ./index.html it also provide a configurable way to provide multiple rewrites.
Context
Juno is expecting developers to use SSG / prerendering. For example, if an URL
/marketplace/sales
is requested and if there is no/marketplace/sales/index.html
or/marketplace/sales.html
available in the dapp, nothing is resolved and the URL ends in error.Solution
Similar to Firebase, we can add an option "Configure as a single-page app (rewrite all urls to /index.html)?"
When set to true, if an URL
/marketplace/sales
would resolve no asset, then it should fallback to the root./index.html
.Firebase
Firebase does more than "just" rewriting to
./index.html
it also provide a configurable way to provide multiple rewrites.https://firebase.google.com/docs/hosting/full-config#rewrites
Certified asset canister
This strategy exists for example on the IC in the certified asset canister.
See:
https://github.com/dfinity/sdk/blob/master/src/canisters/frontend/ic-certified-assets/src/state_machine.rs#L813
https://github.com/dfinity/sdk/blob/master/src/canisters/frontend/ic-certified-assets/src/state_machine.rs#L825
The text was updated successfully, but these errors were encountered: