#Hi everyone

7 messages · Page 1 of 1 (latest)

rotund sleet
#

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

GitHub

A Foundation for Scalable Cross-Platform Apps. Contribute to electron-react-boilerplate/electron-react-boilerplate development by creating an account on GitHub.

zealous hound
#

You use a port in dev, a file in prod

rotund sleet
#

Yeah, I am using it this way itself. Is there any possibility that we can use a specific port instead of file protocol?

zealous hound
#

In prod? Why would you want to do that?

#

localhost is not for prod

rotund sleet
#

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.

weary ether
#

Dm me