From dbed725008bf2a110f70ad8f64c2a9649b333e95 Mon Sep 17 00:00:00 2001 From: INS Date: Tue, 8 Oct 2024 10:41:34 +0800 Subject: [PATCH] feat(frontend): fix file `robots.txt` on middleware --- frontend/public/robots.txt | 12 ++++++------ frontend/src/middleware.ts | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/frontend/public/robots.txt b/frontend/public/robots.txt index 7297ef27..2b2056a3 100644 --- a/frontend/public/robots.txt +++ b/frontend/public/robots.txt @@ -1,7 +1,7 @@ User-agent: * -Disallow: /en/explorer/btc/ -Disallow: /en/explorer/ckb/ -Disallow: /en/assets/coins/ -Disallow: /en/block/ -Disallow: /en/transaction/ -Disallow: /en/address/ +Disallow: /en/explorer/btc +Disallow: /en/explorer/ckb +Disallow: /en/assets/coins +Disallow: /en/block +Disallow: /en/transaction +Disallow: /en/address diff --git a/frontend/src/middleware.ts b/frontend/src/middleware.ts index 304dc34d..ef9ad625 100644 --- a/frontend/src/middleware.ts +++ b/frontend/src/middleware.ts @@ -5,7 +5,7 @@ import { type NextRequest, NextResponse } from 'next/server' const { locales } = linguiConfig export const config = { - matcher: ['/((?!_next/static|_next/image|api|favicon.ico|.*\\.(?:svg|png|jpg|jpeg|gif|webp)$).*)'], + matcher: ['/((?!_next/static|_next/image|api|favicon.ico|robots|.*\\.(?:svg|png|jpg|jpeg|gif|webp|txt)$).*)'], } export async function middleware(request: NextRequest) {