tractordev / wanix

Experimental, local-first, web-native, Unix-like development environment
https://wanix.sh
MIT License
206 stars 11 forks source link

proxy satellite #83

Open progrium opened 5 months ago

progrium commented 5 months ago

Some Wanix domains/deployments might need Internet access that is unavailable from the browser due to CORS. A local dev server can provide this kind of proxying in development, but in production you would need a proxy to run somewhere public. Ideally it would be something you can run cheaply or free as a Cloudflare Worker for example. This "satellite" pattern can be used to support other services in the future that can't be done in a purely browser constrained environment.

Initially this satellite service would just be used for CORS proxying from allowed Wanix domains to allowed domains (like github.com). Although this would be trivial to write in JavaScript for Cloudflare Workers, it would be nice to write it in Go to share code with the CLI (#82) and maintain a project focus on Go. The CLI could even be used to deploy this satellite, especially if we constrain it to Cloudflare initially.