feat: support adding 'crossorigin' attribute
See original GitHub issueBug Report or Feature Request (mark with an x
)
- [ ] bug report -> please search issues before submitting
- [x] feature request
Versions.
@angular/cli: 1.3.0-rc.5 node: 6.11.0 os: win32 x64
Desired functionality.
Add a build/serve option that adds crossorigin="anonymous"
to generated script and style tags.
Adding this attribute will make the request without cookies which are probably an unnecessary overhead on these requests.
This feature can be used if there’s no option to use a cookie-less domain.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:5 (1 by maintainers)
Top Results From Across the Web
HTML attribute: crossorigin - MDN Web Docs
The crossorigin content attribute on media elements is a CORS settings attribute. These attributes are enumerated, and have the following ...
Read more >Cross-Browser support with Cross-Origin isolation
Adding cross-browser support for WebContainers is not as easy as you might think. Let's explore the journey of cross-origin isolation ...
Read more >ECMAScript modules in browsers
If you hit this issue, you can add the crossorigin attribute, which will add credentials to same-origin requests, but not cross-origin ...
Read more >Cross-Origin Resource Sharing | Can I use... Support ...
"Can I use" provides up-to-date browser support tables for support of front-end web technologies on desktop and mobile web browsers.
Read more >CORS Permission Requirement - Amazon SageMaker
If you do not add a CORS configuration to the Amazon S3 buckets that contain your ... sharing with CORS? in the Amazon...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The
crossorigin
attributes are added to scripts when the SRI option is enabled. This allows for useful error messaging within the browser console. The attribute controls the presence of error information for “classic” scripts (i.e., nottype="module"
). No credentials should be sent if the attribute is not present (spec reference) since the “missing default value” is no CORS which would cause a credential mode of “omit”.My app’s assets are hosted on a CDN. I pass the CDN’s URL with the
--deploy-url
option.I think the lack of attribute
crossorigin
on the generatedscript
tags means that I get aScript error
any time an error is thrown in one of the bundles.https://scotch.io/bar-talk/what-the-heck-is-script-error