Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add noindex to the header #616

Merged
merged 2 commits into from
Nov 20, 2024
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: 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
Loading