Closed mikeirvingweb closed 4 months ago
@carldebilly stick an app in Azure Static Web Apps (paid), turn on Password Protection in Configuration.
Load your App URL, enter your password, if your app loads then the fix works.
Previously the app would fail to load.
furthermore @carldebilly
to simulate the deployment, without needing the package change live, publish to a folder, then modify uno-bootstrap.js
omit
to same-origin
in getFetchInit
fetchFile
, change the return statement to return fetch(asset, {credentials: "same-origin"});
then publish your app using swa deploy
furthermore @carldebilly
to simulate the deployment, without needing the package change live, publish to a folder, then modify
uno-bootstrap.js
- change
omit
tosame-origin
ingetFetchInit
- and in
fetchFile
, change the return statement toreturn fetch(asset, {credentials: "same-origin"});
then publish your app using
swa deploy
My comment was more about the ability to create an automated tests in the project CI to test this instead of having to manually test it.
Thanks for your contribution! This is likely difficult to validate as-is, but we can definitely try when the dev build will be available. At the very least, the tests passed.
passing
{credentials: "same-origin"}
intofetch()
calls made byBootstrapper.ts
(uno-bootstrap.js
in eventual web publish) means that the Uno Platform Wasm App will work on web hosting where we are behind authentication, requiring access to an authentication cookie (such as Azure Static Web Apps 'Password Protection')addresses, fixes #875