Am trying to do Angular SSR with canonical URL. AM using the below code, Actually this is working fine with HTTP links. My issue is Canonical url is showing HTTP link and actual my Website is in HTTPS. How to fix this issue..???
let link: HTMLLinkElement = this.doc.createElement('link');
link.setAttribute('rel', 'canonical');
this.doc.head.appendChild(link);
let url = this.doc.URL;
link.setAttribute('href', url);