Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion knip.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"ignoreDependencies": [
"eslint-config-next",
"@chromatic-com/storybook",
"@storybook/addon-themes"
"@storybook/addon-themes",
"react-is"
]
},
"packages/api": {
Expand Down
3 changes: 3 additions & 0 deletions packages/app/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ const nextConfig = {
key: 'X-Frame-Options',
value: 'DENY',
},
...(process.env.NEXT_PUBLIC_NOINDEX === 'true'
? [{ key: 'X-Robots-Tag', value: 'noindex, nofollow' }]
: []),
],
},
];
Expand Down
3 changes: 2 additions & 1 deletion packages/app/pages/_document.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Head, Html, Main, NextScript } from 'next/document';

import { IS_CLICKHOUSE_BUILD } from '@/config';
import { IS_CLICKHOUSE_BUILD, IS_NOINDEX } from '@/config';
import { ibmPlexMono, inter, roboto, robotoMono } from '@/fonts';
import { themes } from '@/theme';

Expand Down Expand Up @@ -33,6 +33,7 @@ export default function Document() {
return (
<Html lang="en" className={`${fontClasses} theme-hyperdx`}>
<Head>
{IS_NOINDEX && <meta name="robots" content="noindex, nofollow" />}
{/* eslint-disable-next-line @next/next/no-sync-scripts */}
<script src="/__ENV.js" />
<script dangerouslySetInnerHTML={{ __html: THEME_INIT_SCRIPT }} />
Expand Down
1 change: 1 addition & 0 deletions packages/app/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export const IS_LOCAL_MODE = //true;
(process.env.NEXT_PUBLIC_IS_LOCAL_MODE ?? 'false') === 'true';
export const IS_CLICKHOUSE_BUILD =
process.env.NEXT_PUBLIC_CLICKHOUSE_BUILD === 'true';
export const IS_NOINDEX = process.env.NEXT_PUBLIC_NOINDEX === 'true';

/** Time captured at module load, use this a stable fallback/default time value instead of Date.now() defined in each React component file */
// eslint-disable-next-line no-restricted-syntax
Expand Down
Loading