This is an automated email from the ASF dual-hosted git repository.
the-other-tim-brown pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-xtable.git
The following commit(s) were added to refs/heads/main by this push:
new a9ef531d [site] Fix CSP violations on the 404 page (#877)
a9ef531d is described below
commit a9ef531d68a297b23813280e95ca52942afb7b4b
Author: Tim Brown <[email protected]>
AuthorDate: Wed Aug 5 14:59:26 2026 -0700
[site] Fix CSP violations on the 404 page (#877)
The 404 page still loads three third-party resources that the ASF
Content-Security-Policy blocks, so in production it renders with a
broken illustration and console errors:
- ajax.googleapis.com WebFont loader (plus the fonts.googleapis.com /
fonts.gstatic.com preconnects) — the page has no Material Icons
ligatures on it at all, so this is dead weight regardless
- d3e54v103j8qbb.cloudfront.net for the "page not found" illustration
- d3e54v103j8qbb.cloudfront.net for jQuery
#764 removed exactly these from the home page, but it did so by deleting
static/404.html outright. #863 then reintroduced the page at
homepage/404.html from the pre-#764 Webflow export, which brought the
CDN references back with it.
Apply the same treatment #764 gave the home page: drop the font loader,
point jQuery at the copy already vendored in static/js/, and vendor the
754-byte illustration into static/images/. The page now loads entirely
from the site's own origin.
Claude-Session: https://claude.ai/code/session_01CyVF3fyK2VQE7DPd31mRLv
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
---
website/homepage/404.html | 8 ++------
website/static/images/page-not-found.svg | 12 ++++++++++++
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/website/homepage/404.html b/website/homepage/404.html
index 324309b1..049a232c 100644
--- a/website/homepage/404.html
+++ b/website/homepage/404.html
@@ -11,22 +11,18 @@
<link href="css/normalize.css" rel="stylesheet" type="text/css">
<link href="css/webflow.css" rel="stylesheet" type="text/css">
<link href="css/onetable-ad267e.webflow.css" rel="stylesheet"
type="text/css">
- <link href="https://fonts.googleapis.com" rel="preconnect">
- <link href="https://fonts.gstatic.com" rel="preconnect"
crossorigin="anonymous">
- <script
src="https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js"
type="text/javascript"></script>
- <script type="text/javascript">WebFont.load({ google: { families:
["Material Icons:regular"] }});</script>
<script type="text/javascript">!function(o,c){var n=c.documentElement,t="
w-mod-";n.className+=t+"js",("ontouchstart"in o||o.DocumentTouch&&c instanceof
DocumentTouch)&&(n.className+=t+"touch")}(window,document);</script>
<link href="images/xtable-favicon.png" rel="shortcut icon"
type="image/x-icon">
<link href="images/webclip.png" rel="apple-touch-icon">
</head>
<body>
<div class="utility-page-wrap">
- <div class="utility-page-content"><img
src="https://d3e54v103j8qbb.cloudfront.net/static/page-not-found.211a85e40c.svg"
alt="">
+ <div class="utility-page-content"><img src="images/page-not-found.svg"
alt="">
<h2>Page Not Found</h2>
<div>The page you are looking for doesn't exist or has been
moved</div>
</div>
</div>
- <script
src="https://d3e54v103j8qbb.cloudfront.net/js/jquery-3.5.1.min.dc5e7f18c8.js?site=65402b66d39d6454e51fabed"
type="text/javascript"
integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0="
crossorigin="anonymous"></script>
+ <script src="js/jquery-3.5.1.min.js" type="text/javascript"></script>
<script src="js/webflow.js" type="text/javascript"></script>
</body>
</html>
\ No newline at end of file
diff --git a/website/static/images/page-not-found.svg
b/website/static/images/page-not-found.svg
new file mode 100644
index 00000000..41b5b63a
--- /dev/null
+++ b/website/static/images/page-not-found.svg
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="47px" height="59px" viewBox="0 0 47 59" version="1.1"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <!-- Generator: Sketch 41 (35326) - http://www.bohemiancoding.com/sketch
-->
+ <title>404 icon</title>
+ <desc>Created with Sketch.</desc>
+ <defs></defs>
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none"
fill-rule="evenodd">
+ <g id="Artboard-Copy-2" transform="translate(-293.000000,
-195.000000)" fill="#333333">
+ <path d="M293,195 L323.5,195 L340,211.5 L340,254 L293,254 L293,195
Z M314,214 L319,214 L319,229 L314,229 L314,214 Z M314,234 L319,234 L319,239
L314,239 L314,234 Z" id="404-icon"></path>
+ </g>
+ </g>
+</svg>
\ No newline at end of file