Closed gbaccetta closed 2 years ago
Hey @gbaccetta this is how the web works, you will need your own proxy server to get around this, there is no other way.
Hi @demchenkoalex thank you for your answer. Yeah I was guessing as much. I was thinking of using firebase cloud functions that are already implemented in my apps, but I was not sure on a to change the request that is performed in the onPreviewDataFetched to achieve that. How can I override the method ? I wish to do it conditionnally using the kisweb flag
I've seen the cors proxy parameter in the sdk but that would not solve my problem with my current architecture. I think that for now I will just disable the preview on the web. I need to figure out how to go around it with firebase hosting and firebase cloud function. If the cloud functions fetch the preview data that should work properly but I need to rewrite the logic you used in your package. I'll let you know. If I achieve that, the code could maybe be shared for people in the same situation as me.
Thank you @gbaccetta!
I've seen the cors proxy parameter in the sdk but that would not solve my problem with my current architecture. I think that for now I will just disable the preview on the web. I need to figure out how to go around it with firebase hosting and firebase cloud function. If the cloud functions fetch the preview data that should work properly but I need to rewrite the logic you used in your package. I'll let you know. If I achieve that, the code could maybe be shared for people in the same situation as me.
Did you have any luck with your work around?
On flutter WEB I'm getting CORS policy error. Other requests I use in my app work properly. What am I doing wrong ?
I used the code from the sample and tried with www.google.com