file:// protocol block resources from "//***.com"

:blush:Oh, I am very embarrassed to ask this question, but I am very cautious after reading the documents I have possible, I came here to ask questions, I hope to get your help!

I used the express to create a local server, and then opened a port using the http protocol to hang my html resources, but the real user environment is full of problems, such as opening a local firewall, port occupancy (although we Can be solved by the program). Because of these problems, I switched to the file protocol, so that we don’t have to open the port, and these problems do not exist.

Today, I found another problem. There are some third-party sdk in my application. It loads some scripts and it sounds normal, but the address it loads does not specify an explicit network protocol, such as http or Instead of https, use “//****.com/path/to/resources”. This directly led to an error that the file could not be found.

Here, I am a headache, I don’t know what to do, I read all the related documents of electron, including using the register***Protocol interface, but they do not seem to have a scheme to handle multiple (file, http ) the ability to return data types.

my goal:
I just want to be able to load my resources without opening the port, of course considering the above “//”.

I’m not an expert in this area, but it sounds to me like the third-party SDK is not compatible with the security needs you have for the desktop application you have in mind.

It is another problem, but as a desktop application it probably be limited by any third-part SDK although sometimes I cannot control the behavior of ‘SDK’.

It is another problem, but as a desktop application it not be limited by any third-party SDK because sometimes I cannot control the behavior of ‘SDK’.

The known condition is the location of my local resource, rather than any requesting that start with ‘//’, so we can filter it, but happened another problem. for detail :slight_smile: