The best solution is probably to update the signature to pass the config (the calling code has it IIRC).

Without the check on the domain, it will have false positives which will break repos by detecting them as github ones instead of git ones