mirror of
https://github.com/atisawd/boxicons.git
synced 2024-11-13 19:04:52 +01:00
Icons do not load in Safari when browsing from http://localhost (CORS error due to unpkg.com's 307 Temporary Redirect)
By using `//` you are matching the host's protocol. This is usually a nice thing, but considering that http://unpkg.com links always 307 temporary redirects to the secure https:// version, it can only pose issues when (a) loading from a http:// context (i.e. http://localhost:4200) with (b) browsers that are more strict like Safari that throws a CORS error when it notices that the resource was redirected (even though it's the same domain and only redirecting from from http:// to https://).
This commit is contained in:
parent
d644fb1f94
commit
35401cf638
1 changed files with 1 additions and 1 deletions
|
@ -81,7 +81,7 @@ export class BoxIconElement extends HTMLElement {
|
||||||
static get cdnUrl() {
|
static get cdnUrl() {
|
||||||
// BUILD.DATA.VERSION is injected by webpack during a build.
|
// BUILD.DATA.VERSION is injected by webpack during a build.
|
||||||
// Value is same as package.json#version property.
|
// Value is same as package.json#version property.
|
||||||
return `//unpkg.com/boxicons@${BUILD.DATA.VERSION}/svg`;
|
return `https://unpkg.com/boxicons@${BUILD.DATA.VERSION}/svg`;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* The html tag name to be use
|
* The html tag name to be use
|
||||||
|
|
Loading…
Reference in a new issue