[FAQ] Custom URL protocol links with target="_blank" don't open in io.Connect Desktop

Problem

A custom URL protocol is registered on the machine through a .reg file. Clicking anchor links that use the target="_blank" attribute does nothing after upgrading to 9.9. Removing target="_blank" from the anchor makes the links work.

Cause

When a custom-protocol link uses target="_blank", io.Connect Desktop applies a security check while handling the request to open a new window. If the custom protocol is not declared in the io.Connect Desktop protocol-handler configuration, the request is blocked as a non-HTTP/file protocol. As a result, the link is blocked and the registered protocol is not executed. This can be vonfirmed in the logs:

[INFO] wnd ... - the "my-custom-protocol://..." is non-http/file protocol and is NOT allowed to be opened.

Solution

Аdd your protocol handler in the system.json with the "register" property to false when the protocol is already registered by another mechanism (such as a .reg file) and io.Connect Desktop will be familiar with it.

"protocolHandler": [
     {
        "enabled": true,
        "type":"custom",
        "allowOpeningURLs": true,
        "protocol": "my-custom-protocol",
        "register": false,
        "startNewInstance": {
            "enabled": true
        }
      }