From 327e10e982d62105f4e0e4631022f0000c38a5e9 Mon Sep 17 00:00:00 2001 From: Jake Jarvis Date: Tue, 1 Apr 2025 12:32:52 -0400 Subject: [PATCH] narrow down redirect/rewrite regexes --- app/themes.css | 6 +++--- next.config.ts | 33 +++++++++------------------------ 2 files changed, 12 insertions(+), 27 deletions(-) diff --git a/app/themes.css b/app/themes.css index 203f5f29..57805c48 100644 --- a/app/themes.css +++ b/app/themes.css @@ -11,7 +11,7 @@ --colors-super-light: #f4f4f4; --colors-super-duper-light: #fbfbfb; --colors-link: #0e6dc2; - --colors-link-underline: rgb(14 109 194 / 40%); + --colors-link-underline: #a6c5e7; --colors-success: #44a248; --colors-error: #ff1b1b; --colors-warning: #f78200; @@ -20,7 +20,7 @@ [data-theme="dark"] { --colors-background-inner: #1e1e1e; --colors-background-outer: #252525; - --colors-background-header: rgb(37 37 37 / 85%); + --colors-background-header: rgb(37 37 37 / 70%); --colors-text: #f1f1f1; --colors-medium-dark: #d7d7d7; --colors-medium: #b1b1b1; @@ -30,7 +30,7 @@ --colors-super-light: #272727; --colors-super-duper-light: #1f1f1f; --colors-link: #88c7ff; - --colors-link-underline: rgb(136 199 255 / 40%); + --colors-link-underline: #496278; --colors-success: #78df55; --colors-error: #ff5151; --colors-warning: #f2b702; diff --git a/next.config.ts b/next.config.ts index fbdadfff..79fafe05 100644 --- a/next.config.ts +++ b/next.config.ts @@ -87,7 +87,7 @@ const nextConfig: NextConfig = { source: "/tweets(|/.*)", headers: [ { - key: "X-Robots-Tag", + key: "x-robots-tag", value: "noindex, nofollow, nosnippet", }, ], @@ -96,8 +96,8 @@ const nextConfig: NextConfig = { rewrites: async () => [ { // https://umami.is/docs/guides/running-on-vercel#proxy-umami-analytics-via-vercel - source: "/_stream/u/:path*", - destination: `${process.env.NEXT_PUBLIC_UMAMI_URL || "https://cloud.umami.is"}/:path*`, + source: "/_stream/u/:path(script.js|api/send)", + destination: `${process.env.NEXT_PUBLIC_UMAMI_URL || "https://cloud.umami.is"}/:path`, }, { // https://github.com/jakejarvis/tweets @@ -125,28 +125,13 @@ const nextConfig: NextConfig = { // mastodon via subdomain: // https://docs.joinmastodon.org/admin/config/#web_domain { - source: "/.well-known/host-meta:path*", - destination: "https://fediverse.jarv.is/.well-known/host-meta:path*", + source: "/.well-known/:path(host-meta|webfinger|nodeinfo)", + destination: "https://fediverse.jarv.is/.well-known/:path", permanent: true, }, { - source: "/.well-known/webfinger:path*", - destination: "https://fediverse.jarv.is/.well-known/webfinger:path*", - permanent: true, - }, - { - source: "/.well-known/nodeinfo:path*", - destination: "https://fediverse.jarv.is/.well-known/nodeinfo:path*", - permanent: true, - }, - { - source: "/@jake", - destination: "https://fediverse.jarv.is/@jake", - permanent: true, - }, - { - source: "/@jake/:path*", - destination: "https://fediverse.jarv.is/@jake/:path*", + source: "/@jake:path(/?|/.*)", + destination: "https://fediverse.jarv.is/@jake:path", permanent: true, }, @@ -154,8 +139,8 @@ const nextConfig: NextConfig = { { source: "/index.xml", destination: "/feed.xml", permanent: true }, { source: "/feed", destination: "/feed.xml", permanent: true }, { source: "/rss", destination: "/feed.xml", permanent: true }, - { source: "/blog/:path*", destination: "/notes", permanent: true }, - { source: "/archives/:path*", destination: "/notes", permanent: true }, + { source: "/blog/(.*)", destination: "/notes", permanent: true }, + { source: "/archives/(.*)", destination: "/notes", permanent: true }, { source: "/resume", destination: "/static/resume.pdf", permanent: false }, { source: "/resume.pdf", destination: "/static/resume.pdf", permanent: false },