From d460fef6e64852bc9e8606860f0cce8ad7fb9854 Mon Sep 17 00:00:00 2001 From: Neko Ayaka Date: Wed, 5 Mar 2025 16:13:55 +0800 Subject: [PATCH] fix(stage-web): header Signed-off-by: Neko Ayaka --- apps/stage-web/netlify.toml | 23 +++++++++++++++++++++++ apps/stage-web/public/_headers | 8 +------- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/apps/stage-web/netlify.toml b/apps/stage-web/netlify.toml index c317419c..c1524ea9 100755 --- a/apps/stage-web/netlify.toml +++ b/apps/stage-web/netlify.toml @@ -6,6 +6,29 @@ publish = "/apps/stage-web/dist" [build.environment] NODE_VERSION = "23" +[[redirects]] +from = "/docs/*" +to = "https://airi-docs.netlify.app/:splat" +status = 200 +force = true + +# Plausible.io analytics +# +# Proxying Plausible through Netlify | Plausible docs +# https://plausible.io/docs/proxy/guides/netlify + +[[redirects]] +from = "/remote-assets/page-external-data/js/script.js" +to = "https://plausible.io/js/script.js" +status = 200 +force = true + +[[redirects]] +from = "/api/v1/page-external-data/submit" +to = "https://plausible.io/api/event" +status = 200 +force = true + [[redirects]] from = "/assets/*" to = "/assets/:splat" diff --git a/apps/stage-web/public/_headers b/apps/stage-web/public/_headers index 9b8a7be6..7f40d089 100644 --- a/apps/stage-web/public/_headers +++ b/apps/stage-web/public/_headers @@ -1,10 +1,4 @@ -# Plausible.io analytics -# -# Proxying Plausible through Netlify | Plausible docs -# https://plausible.io/docs/proxy/guides/netlify -/remote-assets/page-external-data/js/script.js https://plausible.io/js/script.js 200 -/api/v1/page-external-data/submit https://plausible.io/api/event 200 - /assets/* cache-control: max-age=31536000 cache-control: immutable +