Server side request

Hi,

It seems to be possible to make GroupDocs call other servers in various ways.
For example, like it is discussed here:

Here it was working with HTML and ODT files, to trigger a request.
I’ve also seen it happening when using SVG with some external image:
image.png (8.4 KB)

I’d like to prevent any server calls in GroupDocs, especially for Viewer and Conversion.
Can you please help me with that?

If there is no general solution to this, do you have a list of formats I need to take care of?

@Clemens_Pestuka
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CONVERSIONNET-6048, VIEWERNET-4360

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

1 Like

@Clemens_Pestuka

Do you want to specify which domains to be skipped, or you want just to be able to enable/disable loading of external resources?

1 Like

@atir.tahir

Good question. Primarily I want to generally disable loading external resources.
But it will be just a question of time, until on of our customers complains that some of his resources was not loaded. So probably we’ll need both. But rather a white-list than a black-list.
Thanks :slight_smile:

1 Like

@Clemens_Pestuka

We will add this feature in v23.5 of GroupDocs.Conversion for .NET. It will be released at the end of May 2023.

1 Like

@atir.tahir

That sounds great, thank you :slight_smile:

1 Like

@Clemens_Pestuka

You’re welcome.

1 Like

@Clemens_Pestuka
Apologies for the inconvenience caused. After a thorough investigation, we have encountered some complexities in implementing the feature as initially planned. Therefore, we have made the decision to postpone it until version 23.7 of GroupDocs.Conversion for .NET. We appreciate your understanding and patience in this matter. If you have any further questions or concerns, please feel free to reach out to us.

1 Like

@atir.tahir

Sure I agree that it’s a complex task it’s better when it’s done thoroughly than quickly.
Thanks for the update.

Best regards,
Clemens

1 Like

@Clemens_Pestuka

Thank you for your cooperation and understanding.

1 Like

@Clemens_Pestuka

This feature has been implemented in GroupDocs.Viewer for .NET 23.10 in the same way it was done in GroupDocs.Conversion. Two options bool SkipExternalResources and List<string> WhitelistedResources have been added to LoadOptions class.

Example 1: Skip loading all external resources

LoadOptions loadOptions = new LoadOptions();
loadOptions.SkipExternalResources = true; // Skip loading of external resources
using (Viewer viewer = new Viewer("business-flyer.docx", loadOptions))
{
    HtmlViewOptions viewOptions = 
        HtmlViewOptions.ForEmbeddedResources();

    viewer.View(viewOptions);
}

Example 2: Skip loading external resources except the one that has avatars.githubusercontent.com segment in the URL.

LoadOptions loadOptions = new LoadOptions();
loadOptions.SkipExternalResources = true; // Skip loading of external resources
loadOptions.WhitelistedResources.Add("avatars.githubusercontent.com"); //Enable loading of external resources that has 'avatars.githubusercontent.com' fragment in resource URL. 
using (Viewer viewer = new Viewer("business-flyer.docx", loadOptions))
{
    HtmlViewOptions viewOptions = 
        HtmlViewOptions.ForEmbeddedResources();

    viewer.View(viewOptions);
}

This feature has been implemented for

Please let us know if you have any questions.

1 Like