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

lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git


The following commit(s) were added to refs/heads/master by this push:
     new c46f446301 [rest] Introduce `redocPage` variable to support 
customizable parameters on pages using `Redoc` (#5346)
c46f446301 is described below

commit c46f446301fda27c65dafdfeeb3bf554373671d6
Author: Yubin Li <[email protected]>
AuthorDate: Wed Mar 26 10:00:09 2025 +0800

    [rest] Introduce `redocPage` variable to support customizable parameters on 
pages using `Redoc` (#5346)
---
 docs/content/concepts/rest/rest-api.md      | 1 +
 docs/layouts/partials/docs/inject/head.html | 6 +++++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/docs/content/concepts/rest/rest-api.md 
b/docs/content/concepts/rest/rest-api.md
index 70a37c514a..5e20f495a7 100644
--- a/docs/content/concepts/rest/rest-api.md
+++ b/docs/content/concepts/rest/rest-api.md
@@ -2,6 +2,7 @@
 title: "REST API"
 layout: "custom-page"
 bookToc: false
+redocPage: true
 ---
 <!--
 Licensed to the Apache Software Foundation (ASF) under one
diff --git a/docs/layouts/partials/docs/inject/head.html 
b/docs/layouts/partials/docs/inject/head.html
index 08ab31640f..992547540d 100644
--- a/docs/layouts/partials/docs/inject/head.html
+++ b/docs/layouts/partials/docs/inject/head.html
@@ -22,4 +22,8 @@ under the License.
 <link rel="stylesheet" type="text/css" 
href="{{.Site.BaseURL}}/font-awesome/css/font-awesome.min.css">
 <script src="{{.Site.BaseURL}}/js/anchor.min.js"></script>
 <script src="{{.Site.BaseURL}}/js/flink.js"></script>
-<script src="{{.Site.BaseURL}}/js/redoc.standalone.js"></script>
+<!-- Only takes effect when the `redocPage` variable is true. -->
+{{ if .Params.redocPage }}
+    <meta http-equiv="Content-Security-Policy" content="script-src 'self' 
'unsafe-inline' 'unsafe-eval'; default-src 'self' data: blob: 'unsafe-inline' 
https://raw.githubusercontent.com/apache/paimon/master/paimon-open-api/;";>
+    <script src="{{.Site.BaseURL}}/js/redoc.standalone.js"></script>
+{{ end }}

Reply via email to