Skip to content

Commit ecb2160

Browse files
feat: add robots.txt handling for dev and prod environments (#80)
Co-authored-by: Robin Le Caignec <72495599+Le-Caignec@users.noreply.github.com>
1 parent a42b6f0 commit ecb2160

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

robots.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/public/robots-dev.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
User-agent: *
2+
Disallow: /

src/public/robots-prod.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
User-agent: *
2+
Allow: /

vercel.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
{
22
"cleanUrls": true,
33
"redirects": [
4+
{
5+
"source": "/robots.txt",
6+
"destination": "/robots-prod.txt",
7+
"has": [{ "type": "host", "value": "docs.iex.ec" }]
8+
},
9+
{
10+
"source": "/robots.txt",
11+
"destination": "/robots-dev.txt"
12+
},
413
{
514
"source": "/tools/:path*",
615
"destination": "/",

0 commit comments

Comments
 (0)