ktock / container2wasm

Container to WASM converter
https://ktock.github.io/container2wasm-demo/
Apache License 2.0
1.98k stars 72 forks source link

Suggestion: fetch api cors solutions #302

Closed winetree94 closed 1 month ago

winetree94 commented 1 month ago

Thank you for your impressive project. I am exploring ways to integrate this project into modern web projects.

To address browser CORS issues, I have created a small Chrome extension, and I would like to introduce this method to you. This extension hijacks all network requests and injects the necessary headers.

Although it's unfortunate that something needs to be installed, I believe this is currently the simplest way to properly enable network functionality.

Source codes: https://github.com/winetree94/C2W-Web-Starter/tree/main/packages/proxy Download extension: https://c2w-playground.pages.dev/c2w_proxy.zip

You can extract the files and load the extension via 'Load unpacked' at chrome://extensions/.

winetree94 commented 1 month ago

I have discovered a few issues that need to be fixed, so I will close this issue.