Hyperlink redirection

This option is a good choice when you have a redirection service. Deep CDR will add a prefix hyperlink to current hyperlinks. When the user clicks on a hyperlink, your inspection service will scan the link and redirect them to the original URL.

This is an example when integrating with MetaDefender Cloud Safe URL Redirect:

Original: "Please click here to contact us"

Sanitized: "Please click here to contact us"

The feature Dynamic hyperlink redirection allows users to pass a container_identifier via engines-metadata to generate dynamic URL output.

Container identifier serves as an identifier of container document of hyperlinks. Clients may leverage for their own purposes.

Supported file formats

This feature applies to HTML, TXT, and RTF file formats only.

Configuration

Configuration: Workflow > [Workflow Name] > Deep CDR > Advanced Configuration > Others > HTML, then:

  • Process Hyperlink Behavior: Select how hyperlinks should be processed. Set this to Add hyperlink prefix.
  • Hyperlink Prefix: Define the prefix that will be added to output hyperlinks in HTML. To use the feature, the hyperlink prefix must include two placeholders: encoded_target_url and container_identifier , e.g., https://metadefender.opswat.com/safe-redirect?target=<encoded_target_url>&dataid=<container_identifier>.

Now we can pass container_identifier via the engines-metadata (see Supported engines-metadata JSON) to generate dynamic output URL.

Alternatively, we can pass hyperlink_prefix with placeholder <encoded_target_url> and pre-inserted container_identifier. This setting takes a higher priority over the workflow setting. hyperlink_prefix should come along with a setting section name of a corresponding file format. Below is the list of setting sections.

File formatSetting section name
HTMLhtml2html
TXTtxt2txt
RTFrtf2rtf
JSON
Copy
JSON
Copy

Example

With an extracted hyperlink from a document, https://www.opswat.com/docs, the output URL will be https://metadefender.opswat.com/safe-redirect?target=https%3A%2F%2Fwww.opswat.com%2Fdocs&dataid=69aab91a5e37baa713442af9 .

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard