When taking screenshots of web services running on non-standard ports, chrome can classify them as 'Unsafe' and throw a net::ERR_UNSAFE_PORT error.
Proposed Solution
To prevent this the --explicitly-allowed-port flag was implemented in chrome. Unfortunately it appears that each port must be explicit and ranges such as 1-65535 or wildcards are not supported. This creates a comma-separated list from 1-65535 and sets it as the --explicitly-allowed-port flag value, allowing screenshots to be taken on web services running on any port.
Problem
When taking screenshots of web services running on non-standard ports, chrome can classify them as 'Unsafe' and throw a net::ERR_UNSAFE_PORT error.
Proposed Solution
To prevent this the
--explicitly-allowed-port
flag was implemented in chrome. Unfortunately it appears that each port must be explicit and ranges such as 1-65535 or wildcards are not supported. This creates a comma-separated list from 1-65535 and sets it as the--explicitly-allowed-port
flag value, allowing screenshots to be taken on web services running on any port.