From 5788342a4ccbba63092eabf74400ffda4cb77537 Mon Sep 17 00:00:00 2001 From: Sritan Motati <66540532+sritanmotati@users.noreply.github.com> Date: Sun, 9 Feb 2025 14:08:54 -0800 Subject: [PATCH] health (#310) --- src/pages/health.tsx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/pages/health.tsx diff --git a/src/pages/health.tsx b/src/pages/health.tsx new file mode 100644 index 00000000..1138d5f1 --- /dev/null +++ b/src/pages/health.tsx @@ -0,0 +1,16 @@ +import * as React from 'react' +import type { PageProps } from 'gatsby' + +const HealthPage: React.FC = () => { + // Check user agent on the client side + React.useEffect(() => { + const userAgent = window.navigator.userAgent + if (userAgent !== 'service-status') { + window.location.href = '/' + } + }, []) + + return
OK
+} + +export default HealthPage