From 33cf3c1fbea51b8d99166d91dabf60aa9778b192 Mon Sep 17 00:00:00 2001 From: Sandro Ducceschi Date: Thu, 8 Aug 2024 11:58:41 +0200 Subject: [PATCH] MODIFIED: dynamic robots delivery changes output based on received hostname --- docker/nginx-default.conf.template | 4 ++++ public/robots.txt | 3 --- vue.config.js | 6 ++++++ 3 files changed, 10 insertions(+), 3 deletions(-) delete mode 100644 public/robots.txt diff --git a/docker/nginx-default.conf.template b/docker/nginx-default.conf.template index 75c4743..31bc753 100644 --- a/docker/nginx-default.conf.template +++ b/docker/nginx-default.conf.template @@ -122,6 +122,10 @@ server { proxy_pass https://backend.casper.network/cce/sitemap; } + location /robots.txt { + proxy_pass https://backend.casper.network/cce/robots; + } + location @prerender { ssi on; set $prerender 0; diff --git a/public/robots.txt b/public/robots.txt deleted file mode 100644 index 7e2b24a..0000000 --- a/public/robots.txt +++ /dev/null @@ -1,3 +0,0 @@ -User-agent: * - -Sitemap: https://casper.network/sitemap.xml diff --git a/vue.config.js b/vue.config.js index 9108473..add6c6f 100644 --- a/vue.config.js +++ b/vue.config.js @@ -4,6 +4,12 @@ module.exports = { devServer: { public: '0.0.0.0:8080', disableHostCheck: true, + proxy: { + '/robots.txt': { + target: 'http://0.0.0.0:8055/cce/robots', + pathRewrite: { 'robots.txt': '' }, + }, + }, }, pluginOptions: { i18n: {