Add XAcceptVulnerabilities header when getting artifact scan overview (#15853)

Signed-off-by: AllForNothing <sshijun@vmware.com>
This commit is contained in:
孙世军 2021-10-22 17:12:35 +08:00 committed by GitHub
parent 5f3972f86d
commit 528d028f1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,7 +3,13 @@ import { Subscription, timer } from "rxjs";
import { finalize } from "rxjs/operators";
import { ScannerVo } from "../../../../../shared/services";
import { ErrorHandler } from "../../../../../shared/units/error-handler";
import { clone, CURRENT_BASE_HREF, dbEncodeURIComponent, VULNERABILITY_SCAN_STATUS } from "../../../../../shared/units/utils";
import {
clone,
CURRENT_BASE_HREF,
dbEncodeURIComponent,
DEFAULT_SUPPORTED_MIME_TYPES,
VULNERABILITY_SCAN_STATUS
} from "../../../../../shared/units/utils";
import { ArtifactService } from "../../../../../../../ng-swagger-gen/services/artifact.service";
import { Artifact } from "../../../../../../../ng-swagger-gen/models/artifact";
import { NativeReportSummary } from "../../../../../../../ng-swagger-gen/models/native-report-summary";
@ -169,7 +175,8 @@ export class ResultBarChartComponent implements OnInit, OnDestroy {
projectName: this.projectName,
repositoryName: dbEncodeURIComponent(this.repoName),
reference: this.artifactDigest,
withScanOverview: true
withScanOverview: true,
XAcceptVulnerabilities: DEFAULT_SUPPORTED_MIME_TYPES
})
.subscribe((artifact: Artifact) => {
// To keep the same summary reference, use value copy.