flutter-web

How to set up CORS or OPTIONS for Rocket.rs

纵然是瞬间 提交于 2020-11-29 09:21:05
问题 I've got a backend running rocket.rs which my flutter web app sends a request to, but it can't get past the OPTIONS response. I have tried adding CORS (rocket_cors) to the backend and having a options response, but it still sends back: Error: XMLHttpRequest error. dart:sdk_internal 124039:30 get current packages/http/src/browser_client.dart.lib.js 214:124 <fn> I have added the following to my rocket project: #[options("/")] fn send_options<'a>(path: PathBuf) -> Response<'a> { let mut res =

Firebase, Flutter Web App Works locally, but when deployed images are not shown

笑着哭i 提交于 2020-11-25 03:29:12
问题 I have a flutter web app which works well locally but after deploying it using firebase deploy the images are not shown in the website, I have checked if the assets have been uploaded by tracing, e.g. my_app.firebaseapp.com/assets/assets/card.jpg. (And the image is there, so it has uploaded properly but for some reason its not being displayed on the homepage itself). Url: https://websitehostingtry.web.app/#/ https://websitehostingtry.web.app/assets/images/card.jpg when running the same