From 67f87e84e43d94e03f506770122f61ac3802d3e9 Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Fri, 22 Dec 2023 00:33:20 +0800 Subject: [PATCH] feat: add robot to disable invite page fetch by search engine --- client/web/assets/robots.txt | 2 ++ client/web/build/webpack.config.ts | 4 ++++ 2 files changed, 6 insertions(+) create mode 100644 client/web/assets/robots.txt diff --git a/client/web/assets/robots.txt b/client/web/assets/robots.txt new file mode 100644 index 00000000..a6377b86 --- /dev/null +++ b/client/web/assets/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: /invite/ diff --git a/client/web/build/webpack.config.ts b/client/web/build/webpack.config.ts index c6b69e31..82c29eba 100644 --- a/client/web/build/webpack.config.ts +++ b/client/web/build/webpack.config.ts @@ -80,6 +80,10 @@ const plugins: Configuration['plugins'] = [ from: path.resolve(ROOT_PATH, './assets/pwa.webmanifest'), to: 'pwa.webmanifest', }, + { + from: path.resolve(ROOT_PATH, './assets/robots.txt'), + to: 'robots.txt', + }, { from: path.resolve(ROOT_PATH, './assets/_redirects'), to: './', // for netlify