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
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)