Skip to content

Commit 72e2c20

Browse files
authored
feat: add noindex to the header (#616)
1 parent 624d931 commit 72e2c20

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

packages/app-explorer/.env.example

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ NEXT_PUBLIC_IS_PUBLIC_PREVIEW=true
99
NEXT_PUBLIC_WALLET_INSTALL=https://chrome.google.com/webstore/detail/fuel-wallet/dldjpboieedgcmpkchcjcbijingjcgok
1010
NEXT_PUBLIC_WALLET_INSTALL_NEXT=https://next-wallet.fuel.network/docs/install/#install-from-source-code
1111

12+
# SEO
13+
SEO_DISABLED=true
14+
1215
# Explorer API URL
1316
FUEL_EXPLORER_API=
1417
FUEL_EXPLORER_API_KEY=

packages/app-explorer/next.config.mjs

+16
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,22 @@ const config = {
1818
eslint: {
1919
ignoreDuringBuilds: true,
2020
},
21+
async headers() {
22+
const headers = [];
23+
if (process.env.SEO_DISABLED === 'true') {
24+
headers.push({
25+
headers: [
26+
{
27+
key: 'X-Robots-Tag',
28+
value: 'noindex',
29+
},
30+
],
31+
source: '/:path*',
32+
});
33+
}
34+
35+
return headers;
36+
},
2137
redirects: async () => {
2238
return [
2339
{

0 commit comments

Comments
 (0)