Merge pull request #3763 from bluewave-labs/fix/status-page-custom-css-injection

fix(status-page): inject sanitized customCSS on the public page
This commit is contained in:
Alexander Holliday authored and GitHub committed 2026-07-10 09:51:10 -07:00
commit eaf1064413
1 file changed
+6
@@ -21,6 +21,7 @@ import {
getStatusPagePublicUrl,
isCustomDomainHost,
} from "@/Utils/statusPageUrl";
import { cssReferencesExternalResource } from "@/Utils/customCss";
import { HeaderStatusPageControls } from "@/Pages/StatusPage/Status/Components/HeaderStatusPageControls";
import { StatusPageThemeProvider } from "@/Pages/StatusPage/Status/themes/StatusPageThemeProvider";
import {
@@ -132,6 +133,10 @@ const StatusPageView = () => {
// Public route: render directly on the viewport, themed background covers everything.
if (isPublic) {
const themeConfig = THEME_CONFIGS[resolveStatusPageTheme(statusPage.theme)];
const customCss =
statusPage.customCSS && !cssReferencesExternalResource(statusPage.customCSS)
? statusPage.customCSS
: "";
return (
<StatusPageThemeProvider
theme={statusPage.theme}
@@ -139,6 +144,7 @@ const StatusPageView = () => {
timezone={statusPage.timezone}
paintBody
>
{customCss && <style>{customCss}</style>}
<BaseStatusPage
statusPage={statusPage}
monitors={monitors}