C# Azure blobstorage sas密钥在应用程序中不安全

C# Azure blobstorage sas密钥在应用程序中不安全,c#,html,angular,azure-blob-storage,C#,Html,Angular,Azure Blob Storage,我尝试在我的angular应用程序中使用带有sas密钥的azure blob存储获取图像。 但我的控制台总是出现不安全的错误。我也试过使用消毒剂,但不起作用 这是我的代码: sanitizeImageUrl(imageUrl: string): SafeUrl { return this.sanitizer.bypassSecurityTrustResourceUrl(imageUrl); } getFile(id: number): string { this._expo

我尝试在我的angular应用程序中使用带有sas密钥的azure blob存储获取图像。 但我的控制台总是出现不安全的错误。我也试过使用消毒剂,但不起作用

这是我的代码:

sanitizeImageUrl(imageUrl: string): SafeUrl {
    return this.sanitizer.bypassSecurityTrustResourceUrl(imageUrl);
}

  getFile(id: number): string {
    this._exportDataService.getFileFromTalent(id).subscribe(val =>{
      this.file =  val;
  });
    return this.file
  }

{{talent.title}

{{talent.title}

{{talent.description}}

{{talent.title}

您的浏览器不支持视频标记。
我还记录到控制台的链接,在那里它是正确的链接(我可以点击它,我会得到图像)。另外,如果我从控制台复制链接并将其直接粘贴到图像中,将显示正确的图像,因此我认为链接是正确的。 这是不使用sanitize的控制台日志,如果使用sanitize,它只会向其中添加“localhost:…”。

有人知道我如何解决这个问题吗?

你提到过这个吗?你提到这个了吗?
<nz-list nzGrid>
  <div nz-row>
    <mat-selection-list #talentList (selectionChange)="handleSelection()">
      <mat-list-option *ngFor="let talent of talents" [value]="talent.id">
        <div *ngIf="isImage(talent)">
          <p id="title">{{ talent.title }}</p>
          <img [src]="sanitizeImageUrl(getFile(talent.id))" alt="image of talent" />
        </div>
        <div id="textTalent" *ngIf="isText(talent)">
          <p id="title">{{ talent.title }}</p>
          <p>{{ talent.description }}</p>
        </div>
        <div *ngIf="isVideo(talent)">
          <p id="title">{{ talent.title }}</p>
          <video controls>
            <source [src]="talent.item.url" type="video/mp4" />
            Your browser does not support the video tag.
          </video>
          <!--<iframe [src]="talent.item.url">
          </iframe>-->
        </div>
      </mat-list-option>
    </mat-selection-list>
  </div>
</nz-list>