You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by su...@apache.org on 2020/07/27 04:56:32 UTC

[incubator-echarts-doc] branch master updated: enable cors

This is an automated email from the ASF dual-hosted git repository.

sushuang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-echarts-doc.git


The following commit(s) were added to refs/heads/master by this push:
     new be0e44a  enable cors
be0e44a is described below

commit be0e44a4e2dd3922430b497f968020a61c015835
Author: 100pah <su...@gmail.com>
AuthorDate: Mon Jul 27 12:55:42 2020 +0800

    enable cors
---
 src/docHelper.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/docHelper.js b/src/docHelper.js
index 1c1ba88..ccd02ee 100644
--- a/src/docHelper.js
+++ b/src/docHelper.js
@@ -109,7 +109,7 @@ export function preload(_baseUrl, _cdnRoot, _rootName, _docVersion) {
     let outlineUrl = `${cdnRoot}/${rootName}-outline.json?${docVersion}`;
 
     if (!outlineFetcher) {
-        outlineFetcher = fetch(outlineUrl)
+        outlineFetcher = fetch(outlineUrl, {mode: 'cors'})
             .then(response => response.json())
             .then(_json => processOutlines(_json));
     }
@@ -182,7 +182,7 @@ function ensurePageDescStorage(targetPath) {
 
     if (!descStorage[partionKey]) {
         let url = `${cdnRoot}/${partionKey}.json?${docVersion}`;
-        let fetcher = fetch(url).then(response => response.json());
+        let fetcher = fetch(url, {mode: 'cors'}).then(response => response.json());
         descStorage[partionKey] = {
             fetcher
         };


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org