question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[serving feature] Support Cross Origin Resource Policy for hosted js script

See original GitHub issue

In order to be able to use the iconify script with the <script> tag and with Cross Origin Embedder Policy enabled (good security practice), the iconify server would be required to respond with the Cross Origin Resource Policy set to ‘cross-origin’.

Is it something doable on your side?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
cyberaliencommented, Mar 20, 2022

Tested differences with and without header. It does fix issue and doesn’t break anything for users that do not use cross-origin headers. Added headers to code.iconify.design.

It will take a while to add them to API because there are many servers. Each of them needs to be temporarily taken out of network to update nginx config and I want to start with server in Frankfurt that is closest to me so I could see changes immediately, which should be done early in the morning when traffic is lowest. So I’ll start working on that tomorrow.

1reaction
userquincommented, Mar 20, 2022

@cyberalien @qortex using popular cdn returning this headers (last 3 not required: for example google fonts send them):

access-control-allow-origin: *
cross-origin-resource-policy: cross-origin
access-control-expose-headers: *
cross-origin-opener-policy: same-origin-allow-popups
timing-allow-origin: *

Check headers for these urls:

I have had problems using some cdn with pwa and opaque resources: with previous headers the problem disappear (some crossorigin="anonymous" attr required).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cross-Origin Resource Sharing (CORS) - MDN Web Docs
CORS also relies on a mechanism by which browsers make a "preflight" request to the server hosting the cross-origin resource, ...
Read more >
Cross-Origin Resource Sharing (CORS) - AWS SDK for ...
Cross -origin resource sharing, or CORS, is a security feature of modern web browsers. It enables web browsers to negotiate which domains can...
Read more >
A guide to enable cross-origin isolation - web.dev
This guide shows you how to enable cross-origin isolation. Cross-origin isolation is required if you want to use SharedArrayBuffer ...
Read more >
CORS Tutorial: A Guide to Cross-Origin Resource Sharing
is a protocol that enables scripts running on a browser client to interact with resources from a different origin.
Read more >
Authoritative guide to CORS (Cross-Origin Resource Sharing ...
CORS is a relaxation of the same-origin policy implemented in modern browsers. Without features like CORS, websites are restricted to accessing ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found