I am using electron-react-boilerplate ( https://github.com/electron-react-boilerplate/electron-react-boilerplate). Here in this boilerplate, they are hosting the packaged app using file protocol. Can you please help on understanding why it is done like that? Can we use a port instead of file protocol? Please refer to this link for the piece of code https://github.com/electron-react-boilerplate/electron-react-boilerplate/blob/main/src/main/util.ts#L12
#1022347222421086248 #plz-help-old
#Hi everyone
7 messages · Page 1 of 1 (latest)
You use a port in dev, a file in prod
Yeah, I am using it this way itself. Is there any possibility that we can use a specific port instead of file protocol?
I am trying to load an URL inside the iframe tag inside the electron app, it is loading the URL in dev mode as we have whitelisted http://localhost:1212 but for prod, as it is file protocol, we can't whitelist file:// in our domain as it is not a valid CSP, because of that we are getting this error.
Dm me