feat(docs): add revalidation api route (#29378)
Add a route for manually revalidating cache contents by tag.
The route is protected by authentication to prevent abuse. Automated
actions in CI should be set up with a basic API key, which has a rate
limit of 6 hours between changes. Overriding is possible with an
override key, which should be used as an escape hatch.
Usage:
- API key provided in header `Authorization: Bearer <KEY>`
- Body has shape `{ tags: string[] }`
This commit is contained in:
10
turbo.json
10
turbo.json
@@ -13,7 +13,15 @@
|
||||
},
|
||||
"docs#build": {
|
||||
"dependsOn": ["^build"],
|
||||
"env": ["ANALYZE", "NEXT_PUBLIC_*", "NODE_ENV", "OPENAI_API_KEY"],
|
||||
"env": [
|
||||
"ANALYZE",
|
||||
"DOCS_REVALIDATION_KEYS",
|
||||
"DOCS_REVALIDATION_OVERRIDE_KEYS",
|
||||
"NEXT_PUBLIC_*",
|
||||
"NODE_ENV",
|
||||
"OPENAI_API_KEY",
|
||||
"SUPABASE_SECRET_KEY"
|
||||
],
|
||||
"outputs": [".next/**", "!.next/cache/**"]
|
||||
},
|
||||
"studio#build": {
|
||||
|
||||
Reference in New Issue
Block a user