http over https issue with browser errors

having an issue with SSL where the /dm-sso-endpoint/#### url is loading over http while in an https checkout page in my store. I was able to edit the /plugins/domain-mapping/classes/Domainmap/Module/Cdsso.php file and add the below code at line 388 to resolve the issue.

if (strtolower($_SERVER['HTTPS']) == 'on') {
$url = str_replace('http:','https:',$url);

Looks like above it at line 382 it sets http:// statically.

Please let me know if this is a good fix, and if this can be updated in the plugin in the next update so that my customers can continue using the multi-domain sso verifier stuff.