Skip to content

Commit

Permalink
feat: add noindex to the header (#616)
Browse files Browse the repository at this point in the history
  • Loading branch information
helciofranco authored Nov 20, 2024
1 parent 624d931 commit 72e2c20
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/app-explorer/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ NEXT_PUBLIC_IS_PUBLIC_PREVIEW=true
NEXT_PUBLIC_WALLET_INSTALL=https://chrome.google.com/webstore/detail/fuel-wallet/dldjpboieedgcmpkchcjcbijingjcgok
NEXT_PUBLIC_WALLET_INSTALL_NEXT=https://next-wallet.fuel.network/docs/install/#install-from-source-code

# SEO
SEO_DISABLED=true

# Explorer API URL
FUEL_EXPLORER_API=
FUEL_EXPLORER_API_KEY=
Expand Down
16 changes: 16 additions & 0 deletions packages/app-explorer/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,22 @@ const config = {
eslint: {
ignoreDuringBuilds: true,
},
async headers() {
const headers = [];
if (process.env.SEO_DISABLED === 'true') {
headers.push({
headers: [
{
key: 'X-Robots-Tag',
value: 'noindex',
},
],
source: '/:path*',
});
}

return headers;
},
redirects: async () => {
return [
{
Expand Down

0 comments on commit 72e2c20

Please sign in to comment.