electron makes me sad

not in a "i expect every developer to implement a native app for windows mac & linux" way, but in a "why do i still have to follow the web security model & CORS when i literally own the process

(for context: i am writing a web app that interact with the resonite api, which previously my dev process involved having a caddy file that you have to launch, along side the Parcel dev server to get the app to work

the reason you have to do this is

- no cors on the resonite API
- the websocket server requires you to send an Authorization header. W3C do not allow you to send headers when creating a websocket connection.

i thought i could make this easier by having a little electron app that did all the proxying for you: problems are:

- you cannot disable CORS validation in electron. you still have to follow CORS
- while you can set up custom protocols to proxy requests through. this doesn't support websocket and breaks with image loading fsr.
- i am having to set up a websocket server listening on a random port to get that working

i am this close to just having it start a copy of Caddy)

@tay i am sure you've tried this already but can't you use electron's own IPC to do the websocket on one of it's pure node.js environments and use that as the proxy for the browser process?
@tay i know electron also has a way to make the browser process run in node.js directly but you may have other security needs that make that impractical
@kopper that involves writing a fair bit of code which idk if i want to actually do right now