Files
2026-07-13 12:38:36 +08:00

186 lines
6.1 KiB
TOML

[[headers]]
for = "/*"
[headers.values]
X-Frame-Options = "DENY"
Content-Security-Policy = "frame-ancestors 'none'"
Referrer-Policy = "strict-origin-when-cross-origin"
Permissions-Policy = "camera=(), microphone=(), geolocation=()"
# Agent discovery via RFC 8288 Link headers (see https://isitagentready.com/.well-known/agent-skills/link-headers/SKILL.md)
# Points AI agents/crawlers at machine-readable entry points hosted on nx.dev.
Link = '''</llms.txt>; rel="describedby"; type="text/plain", </llms-full.txt>; rel="service-doc"; type="text/plain", </sitemap.xml>; rel="sitemap"; type="application/xml"'''
# Disable gradle and maven plugins on Netlify
# (Netlify only supports Java 8 but these plugins require Java 17)
[build.environment]
NX_GRADLE_DISABLE = "true"
NX_MAVEN_DISABLE = "true"
NX_DOTNET_DISABLE = "true"
# Edge functions are auto-discovered from netlify/edge-functions/
# Path configuration is in each function's inline `config` export
# Permanent redirects (301 by default)
# Storybook docs consolidation
[[redirects]]
from = "/docs/technologies/test-tools/storybook/guides/storybook-9-setup"
to = "/docs/technologies/test-tools/storybook/guides/upgrading-storybook"
[[redirects]]
from = "/"
to = "/docs/getting-started/intro"
[[redirects]]
from = "/showcase"
to = "/docs/quickstart"
[[redirects]]
from = "/showcase/example-repos/*"
to = "/docs/quickstart"
[[redirects]]
from = "/showcase/benchmarks/*"
to = "/docs/reference/benchmarks/:splat"
# DOC-452: Old framework tutorials redirect to new topic-based tutorials
[[redirects]]
from = "/docs/getting-started/tutorials/react-monorepo-tutorial"
to = "/docs/getting-started/tutorials/crafting-your-workspace"
[[redirects]]
from = "/docs/getting-started/tutorials/angular-monorepo-tutorial"
to = "/docs/getting-started/tutorials/crafting-your-workspace"
[[redirects]]
from = "/docs/getting-started/tutorials/typescript-packages-tutorial"
to = "/docs/getting-started/tutorials/crafting-your-workspace"
# DOC-452: Learn Nx URLs redirect to Tutorials (in case any were indexed)
[[redirects]]
from = "/docs/getting-started/learn-nx/*"
to = "/docs/getting-started/tutorials/:splat"
# Fix broken /docs/ paths still linked from CLI/Cloud source code (DOC-428)
[[redirects]]
from = "/docs/features/ci-features/self-healing"
to = "/docs/features/ci-features/self-healing-ci"
# DOC-513: Manual DTE guide renamed to Bring Your Own Compute
[[redirects]]
from = "/docs/guides/nx-cloud/manual-dte"
to = "/docs/guides/nx-cloud/bring-your-own-compute"
[[redirects]]
from = "/docs/extending-nx/recipes/create-preset"
to = "/docs/extending-nx/create-preset"
[[redirects]]
from = "/docs/guides/adopting-nx/adding-to-monorepos"
to = "/docs/guides/adopting-nx/adding-to-monorepo"
# Angular multiple workspace migration page removed (DOC-419)
[[redirects]]
from = "/docs/technologies/angular/migration/angular-multiple"
to = "/docs/technologies/angular/migration/angular"
[[redirects]]
from = "/docs/getting-started/nx-cloud"
to = "/docs/features/ci-features"
# NX-4480: Self-hosted remote cache packages deprecated (CVE-2025-36852)
[[redirects]]
from = "/docs/reference/remote-cache-plugins"
to = "/docs/reference/deprecated/self-hosted-cache-packages"
[[redirects]]
from = "/docs/reference/remote-cache-plugins/s3-cache"
to = "/docs/reference/deprecated/self-hosted-cache-packages"
[[redirects]]
from = "/docs/reference/remote-cache-plugins/s3-cache/overview"
to = "/docs/reference/deprecated/self-hosted-cache-packages"
[[redirects]]
from = "/docs/reference/remote-cache-plugins/gcs-cache"
to = "/docs/reference/deprecated/self-hosted-cache-packages"
[[redirects]]
from = "/docs/reference/remote-cache-plugins/gcs-cache/overview"
to = "/docs/reference/deprecated/self-hosted-cache-packages"
[[redirects]]
from = "/docs/reference/remote-cache-plugins/azure-cache"
to = "/docs/reference/deprecated/self-hosted-cache-packages"
[[redirects]]
from = "/docs/reference/remote-cache-plugins/azure-cache/overview"
to = "/docs/reference/deprecated/self-hosted-cache-packages"
[[redirects]]
from = "/docs/reference/remote-cache-plugins/shared-fs-cache"
to = "/docs/reference/deprecated/self-hosted-cache-packages"
[[redirects]]
from = "/docs/reference/remote-cache-plugins/shared-fs-cache/overview"
to = "/docs/reference/deprecated/self-hosted-cache-packages"
[[redirects]]
from = "/docs/reference/remote-cache-plugins/shared-fs-cache/generators"
to = "/docs/reference/deprecated/self-hosted-cache-packages"
# DOC-503: CI page moved out of tutorials to top-level Getting Started
[[redirects]]
from = "/docs/getting-started/tutorials/self-healing-ci-tutorial"
to = "/docs/getting-started/setup-ci"
# Resource usage consolidated into the Nx Cloud add-ons platform feature pages
[[redirects]]
from = "/docs/guides/nx-cloud/ci-resource-usage"
to = "/docs/features/ci-features/resource-usage"
# NXC-4453: Knowledge Base "Installation" section renamed to "Installation and updates"
[[redirects]]
from = "/docs/knowledge-base/installation"
to = "/docs/knowledge-base/installation-and-updates"
# @nx/vite:convert-to-inferred linked to this. The link need to be fixed in code, and
# this redirect added to handle holder plugin versions using the old link.
# https://github.com/nrwl/nx/issues/36053
[[redirects]]
from = "/docs/technologies/build-tools/vite/configure-vite"
to = "/docs/technologies/build-tools/vite/guides/configure-vite"
# DOC-544: Pre-2022 docs URL structure still receives heavy traffic (65k+ requests/30d) and 404s.
[[redirects]]
from = "/angular/plugins/*"
to = "/docs/technologies/angular/introduction"
# DOC-522: Polygraph is a standalone product, no longer part of Nx Cloud.
# Reroute the Polygraph-specific docs pages to the standalone landing page.
# force = true so these win over the catch-all rewrite below.
[[redirects]]
from = "/docs/enterprise/polygraph"
to = "https://trypolygraph.com"
status = 301
force = true
[[redirects]]
from = "/docs/concepts/synthetic-monorepos"
to = "https://trypolygraph.com"
status = 301
force = true
[[redirects]]
from = "/docs/enterprise/metadata-only-workspace"
to = "https://trypolygraph.com"
status = 301
force = true
# Rewrite for base path handling (keeps URL the same)
[[redirects]]
from = "/docs/*"
to = "/:splat"
status = 200