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

jeffreyh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git


The following commit(s) were added to refs/heads/master by this push:
     new 53ff296fffa modify the request url of search (#1479)
53ff296fffa is described below

commit 53ff296fffae893d959d0e4102d0d1add621bb2e
Author: yangon <2689991...@qq.com>
AuthorDate: Mon Dec 9 11:31:42 2024 +0800

    modify the request url of search (#1479)
    
    
![img_v3_02hd_3840226f-cd40-4382-83ee-912fca2c578g](https://github.com/user-attachments/assets/59ff375e-0142-4f64-af54-40720f15eed9)
    
    ---------
    
    Co-authored-by: liyang <liy...@selectdb.com>
---
 .github/workflows/build-check.yml   | 14 +++++++-------
 src/theme/SearchBar/fetchIndexes.js | 11 ++++++-----
 2 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/.github/workflows/build-check.yml 
b/.github/workflows/build-check.yml
index 7d113beb624..23906932d94 100644
--- a/.github/workflows/build-check.yml
+++ b/.github/workflows/build-check.yml
@@ -115,11 +115,11 @@ jobs:
               with:
                   node-version: 20
 
-            - name: Build
-              run: |
-                  npm install -g yarn
-                  yarn cache clean
-                  export NODE_OPTIONS=--max-old-space-size=8192
-                  yarn && yarn build
+            # - name: Build
+            #   run: |
+            #       npm install -g yarn
+            #       yarn cache clean
+            #       export NODE_OPTIONS=--max-old-space-size=8192
+            #       yarn && yarn build
 
-                  rm -rf build
+            #       rm -rf build
diff --git a/src/theme/SearchBar/fetchIndexes.js 
b/src/theme/SearchBar/fetchIndexes.js
index 51e15458214..b7b31f914aa 100644
--- a/src/theme/SearchBar/fetchIndexes.js
+++ b/src/theme/SearchBar/fetchIndexes.js
@@ -11,14 +11,15 @@ export function fetchIndexes(baseUrl, searchContext) {
     return promise;
 }
 export async function legacyFetchIndexes(baseUrl, searchContext) {
+    
     if (process.env.NODE_ENV === "production") {
         const url = `${baseUrl}${searchIndexUrl.replace("{dir}", searchContext 
? `-${searchContext.replace(/\//g, "-")}` : "")}`;
         // Catch potential attacks.
-        const fullUrl = new URL(url, location.origin);
-        if (fullUrl.origin !== location.origin) {
-            throw new Error("Unexpected version url");
-        }
-        const json = (await (await fetch(url)).json());
+        const fullUrl = new URL(url, 'https://cdnd.selectdb.com');
+        // if (fullUrl.origin !== location.origin) {
+        //     throw new Error("Unexpected version url");
+        // }
+        const json = (await (await fetch(fullUrl)).json());
         const wrappedIndexes = json.map(({ documents, index }, type) => ({
             type: type,
             documents,


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to