I implemented a ifame inside my angular app, first it blocked the resource, then i added a pipe to access the resource and now the browser is blocking it because of mixed content because its not loading the content over https
stundenplan.component.ts:
<div class="col-sm-9 content">
<div class="dashhead">
<div class="dashhead-titles">
<h6 class="dashhead-subtitle">TeamCloud</h6>
<h2 class="dashhead-title">Stundenplan</h2>
</div>
</div>
<hr class="m-t">
<div class="container">
<iframe style="width: 100%; height: 900px;" frameborder="0" [src]="'http://******' | safeIframe"></iframe>
</div> <!-- /container -->
</div>
safe-iframe.pipe.ts:
import { DomSanitizer } from '@angular/platform-browser';
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'safeIframe'
})
export class SafeIframePipe implements PipeTransform {
constructor(private sanitizer: DomSanitizer){}
transform(url:string) {
return this.sanitizer.bypassSecurityTrustResourceUrl(url);
}
}
error im getting when loading the page Mixed Content: The page at 'https://teamcloud.******/stundenplan' was loaded over HTTPS, but requested an insecure resource 'http://******'. This request has been blocked; the content must be served over HTTPS