Uh oh!
There was an error while loading. Please reload this page.
HBASE-29115 Fix website cannot load some resources because of CSP - #6668
Conversation
PDavid
commented
Feb 7, 2025
I'm not sure if this is the most efficient way to download and extract the CSS and JS files with Maven, so any feedback is appreciated. |
PDavid
commented
Feb 7, 2025
Would be great to upgrade from Bootstrap 2.3.2 as it contains 6 CVE-s and it is end of life since 11 years... |
PDavid
commented
Feb 7, 2025
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
3b3a7fa to
8b4549cComparePDavid
commented
Feb 10, 2025
Still looking into the last problem: The Reference Guide HTML page tries to load the MathJax.js library from cdnjs.cloudflare.com (which is also blocked by CSP). |
PDavid
commented
Feb 10, 2025
Unfortunately it seems that right now there is no way to influence from where the Reference Guide Asciidoc includes the MathJax.js library.
|
Apache9
commented
Feb 10, 2025
Is it possible to replace the location string in the generated HTML when committing the changes to our site repo? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
8b4549c to
512dba7Compare512dba7 to
52fba14Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
PDavid
commented
Feb 25, 2025
Hi @Apache9, @ndimiduk, @NihalJain, Can you please have a look on this? As far as I understand, the new Content Security Policy (CSP) will be turned on March 1st, 2025. While the website seemed to be functional, the reference guide (book.html) had some smaller issues (missing icons, not rendered mathematical formulas, etc). The PR build failed but as I saw it was unrelated. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This comment has been minimized.
This comment has been minimized.
ndimiduk
left a comment
There was a problem hiding this comment.
I have nothing to add here, @NihalJain has got you. Thanks for picking this up, @PDavid !
Uh oh!
There was an error while loading. Please reload this page.
| <configuration> | ||
| <artifactItems> | ||
| <artifactItem> | ||
| <groupId>org.webjars</groupId> |
This comment has been minimized.
This comment has been minimized.
NihalJain
commented
Feb 26, 2025
@PDavid Please let me know if I can go ahead and merge this now. |
PDavid
commented
Feb 27, 2025
Many thanks @NihalJain. 👍 I now added a comment and links to the MathJax workaround in the shell script. I'd wait until the PR build is done and then I think this is ready to be merged. |
This comment has been minimized.
This comment has been minimized.
PDavid
commented
Feb 27, 2025
BTW the PR site build is failing because of checkstyle is not able to parse ReplicaKey.java (because of instanceOf pattern match): Probably checktyle needs to be updated. @petersomogyi is already mentioned that he is looking into this issue. |
Apache9
commented
Feb 27, 2025
Please file an issue to use java 8 style instanceof to fix the problem, to align the code between branch-3+ and branch-2.x? @rmdmattingly ? |
PDavid
commented
Feb 27, 2025
|
This comment has been minimized.
This comment has been minimized.
…f CSP Self-host Boostrap CSS, highlight.js (CSS and JS) instead of trying load it from CDN-s. Because of the new CSP, loading these from CDN-s is blocked.
d04d898 to
6d93675ComparePDavid
commented
Feb 28, 2025
The website build is now fixed on master, so rebased this PR on master to have a better PR build. |
Apache-HBase
commented
Feb 28, 2025
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Feb 28, 2025
🎊 +1 overall
This message was automatically generated. |
PDavid
commented
Feb 28, 2025
@NihalJain The PR build looks good to me, I think this PR is now ready to be merged. |
Merged this to master. Thanks @PDavid . I am away from my laptop. Could you raise backports for all affected branches.? Although I am not sure if these changes are needed by other branches at all. |
PDavid
commented
Mar 3, 2025
Thank you very much @NihalJain! 🎉
In this PR we changed how we include static resources in the website and in the Reference Guide (book.html). Maybe I can raise the backports, so that we could regenerate the old reference guides (if possible) and the code in pom.xml and site.xml does not get too different between branches. What do you think? |
ndimiduk
commented
Mar 3, 2025
I believe that we only generate the site and book content from |


stylesdirso that book.html will include/css/font-awesome.css(where the file is) and not/font-awesome.css.