This is an automated email from the ASF dual-hosted git repository.
lhotari pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git
The following commit(s) were added to refs/heads/main by this push:
new fd4e7f99fcb7 Fix /admin-rest-api loading after Apache CSP change that
blocked loading from external sources
fd4e7f99fcb7 is described below
commit fd4e7f99fcb78eaf7c7187c9d4046652fe5cad4a
Author: Lari Hotari <[email protected]>
AuthorDate: Fri Feb 14 17:11:31 2025 +0200
Fix /admin-rest-api loading after Apache CSP change that blocked loading
from external sources
---
src/pages/RestApi/RestApi.tsx | 2 +-
static/js/redoc.min.js | 8 ++++++++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/pages/RestApi/RestApi.tsx b/src/pages/RestApi/RestApi.tsx
index 431c20791478..690257ec4236 100644
--- a/src/pages/RestApi/RestApi.tsx
+++ b/src/pages/RestApi/RestApi.tsx
@@ -102,7 +102,7 @@ class RestApi extends React.Component {
const redocLink = document.createElement("script");
redocLink.setAttribute(
"src",
- "https://rebilly.github.io/ReDoc/releases/latest/redoc.min.js"
+ "/js/redoc.min.js"
);
const script = document.querySelector(".container script");
wrapper.insertBefore(redoc, script);
diff --git a/static/js/redoc.min.js b/static/js/redoc.min.js
new file mode 100644
index 000000000000..d5cded9067d8
--- /dev/null
+++ b/static/js/redoc.min.js
@@ -0,0 +1,8 @@
+/*!
+ * ReDoc - OpenAPI/Swagger-generated API Reference Documentation
+ * -------------------------------------------------------------
+ * Version: "1.22.3"
+ * Repo: https://github.com/Rebilly/ReDoc
+ */
+!function(e,t){"object"==typeof exports&&"object"==typeof
module?module.exports=t(function(){try{return
require("esprima")}catch(e){}}(),function(){try{return
require("jquery")}catch(e){}}()):"function"==typeof
define&&define.amd?define("Redoc",["esprima","jquery"],t):"object"==typeof
exports?exports.Redoc=t(function(){try{return
require("esprima")}catch(e){}}(),function(){try{return
require("jquery")}catch(e){}}()):e.Redoc=t(e.esprima,e.jquery)}("undefined"!=typeof
self?self:this,functi [...]
",u=RegExp("^"+s+s+"*"),c=RegExp(s+s+"*$"),p=function(e,t,n){var
o={},s=i(function(){return!!a[e]()||l[e]()!=l}),u=o[e]=s?t(d):a[e];n&&(o[n]=u),r(r.P+r.F*s,"String",o)},d=p.trim=function(e,t){return
e=String(o(e)),1&t&&(e=e.replace(u,"")),2&t&&(e=e.replace(c,"")),e};e.exports=p},function(e,t,n){"use
strict";var
r=n(197)(!0);n(127)(String,"String",function(e){this._t=String(e),this._i=0},function(){var
e,t=this._t,n=this._i;return n>=t.length?{value:void
0,done:!0}:(e=r(t,n),this._i+=e.len [...]
":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function p(e){return
e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}function
d(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||U,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=
[...]
\u2028\u2029".indexOf(this.buffer.charAt(r-1));)if(r-=1,this.position-r>t/2-1){n="
... ",r+=5;break}for(i="",a=this.position;a<this.buffer.length&&-1==="\0\r\n
\u2028\u2029".indexOf(this.buffer.charAt(a));)if((a+=1)-this.position>t/2-1){i="
... ",a-=5;break}return s=this.buffer.slice(r,a),o.repeat("
",e)+n+s+i+"\n"+o.repeat("
",e+this.position-r+n.length)+"^"},r.prototype.toString=function(e){var
t,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line
"+(this.line+1)+", column
"+(this.column+1),e||(t=this.getSnippet())&&(n+=":\n"+t),n},e.exports=r},function(e,t,n){"use
strict";var r=n(13);e.exports=new r("tag:yaml.org,2002:str",{kind:"sc [...]
+//# sourceMappingURL=redoc.min.map
\ No newline at end of file