ReturnUrl not prepending site name when resolving links to CFS files

Running version

Custom plug-in created following  Single Sign-On Plugins 

When an email with an attachment goes out, the attachment URL follows the pattern:{Folderpath}/{filename}

This gets passed into an SSO login as a ReturnUrl parameter that starts at the /cfs-file/ portion of the URL and does not include the site name like every other link on the site which causes SSO to fail to return to the correct place.

Is there a setting somewhere to force the CFS to include the site name in the ReturnUrl parameter?

Is it possible to intercept the ReturnUrl and inject that in the plug-in code?

[edited by: starksk at 8:36 PM (GMT 0) on Thu, Jan 13 2022]