CrossOriginStrategy

CrossOriginStrategy is a class exposed by @abp/ng.core package. Its instances define how a source referenced by an element will be retrieved by the browser and are consumed by other classes such as LoadingStrategy.

API

constructor

constructor(
  public crossorigin: 'anonymous' | 'use-credentials',
  public integrity?: string
)
JavaScript

setCrossOrigin

setCrossOrigin(element: HTMLElement): void
JavaScript

This method maps the aforementioned properties to the given element.

Predefined Cross-Origin Strategies

Predefined cross-origin strategies are accessible via CROSS_ORIGIN_STRATEGY constant.

Anonymous

CROSS_ORIGIN_STRATEGY.Anonymous(integrity?: string)
JavaScript

crossorigin will be set as "anonymous" and integrity is optional.

UseCredentials

CROSS_ORIGIN_STRATEGY.UseCredentials(integrity?: string)
JavaScript

crossorigin will be set as "use-credentials" and integrity is optional.

Contributors


Last updated: July 31, 2024 Edit this page on GitHub

Was this page helpful?

Please make a selection.

To help us improve, please share your reason for the negative feedback in the field below.

Please enter a note.

Thank you for your valuable feedback!

Please note that although we cannot respond to feedback, our team will use your comments to improve the experience.

Community Talks

Deep Dive #1: Identity&Account Modules

17 Apr, 17:00
Online
Register Now
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book