Block /growth/ and /.agents/ with redirects, not rewrites
Vercel serves an existing static file before applying a rewrite, so the previous rewrite block did nothing and the strategy docs returned 200. Redirects run before the filesystem check, so these now leave the site.
This commit is contained in:
1 parent
3c961abd4a
commit
86f152daf7
1 file changed
+2
-4
+2
-4
@@ -5,6 +5,8 @@
|
|||||||
"trailingSlash": true,
|
"trailingSlash": true,
|
||||||
"cleanUrls": true,
|
"cleanUrls": true,
|
||||||
"redirects": [
|
"redirects": [
|
||||||
|
{ "source": "/.agents/:path*", "destination": "/404.html", "permanent": false },
|
||||||
|
{ "source": "/growth/:path*", "destination": "/404.html", "permanent": false },
|
||||||
{
|
{
|
||||||
"source": "/en/index.html",
|
"source": "/en/index.html",
|
||||||
"destination": "/en/",
|
"destination": "/en/",
|
||||||
@@ -251,10 +253,6 @@
|
|||||||
"permanent": true
|
"permanent": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"rewrites": [
|
|
||||||
{ "source": "/.agents/:path*", "destination": "/__internal-only" },
|
|
||||||
{ "source": "/growth/:path*", "destination": "/__internal-only" }
|
|
||||||
],
|
|
||||||
"headers": [
|
"headers": [
|
||||||
{
|
{
|
||||||
"source": "/(.*)",
|
"source": "/(.*)",
|
||||||
|
|||||||
Reference in new issue
Block a user