File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ async function resolveDocPath(
4646 {
4747 redirect : "manual" ,
4848 signal : controller . signal ,
49- cache : "no-store" ,
49+ next : { revalidate : 300 } , // 缓存 5 分钟,防止 bot 扫描频繁触发冷启动与后端查询
5050 // 显式 UA:Vercel SSR 默认出口 UA 可能被 CF bot filter 拦(对齐 feed/page fetchLinks)
5151 headers : {
5252 accept : "application/json" ,
Original file line number Diff line number Diff line change @@ -245,13 +245,15 @@ export default async function FeedPage({ searchParams }: FeedPageProps) {
245245 { tab === "links" ? (
246246 < Link
247247 href = "/feed/submit"
248+ prefetch = { false }
248249 className = "shrink-0 inline-block px-6 py-2.5 border border-[var(--foreground)] font-sans text-xs uppercase tracking-widest font-bold text-[var(--foreground)] hover:bg-[var(--foreground)] hover:text-[var(--background)] transition-all duration-200"
249250 >
250251 + 丢个链接
251252 </ Link >
252253 ) : (
253254 < Link
254255 href = "/editor"
256+ prefetch = { false }
255257 className = "shrink-0 inline-block px-6 py-2.5 border border-[var(--foreground)] font-sans text-xs uppercase tracking-widest font-bold text-[var(--foreground)] hover:bg-[var(--foreground)] hover:text-[var(--background)] transition-all duration-200"
256258 >
257259 + 写篇文章
@@ -292,6 +294,7 @@ export default async function FeedPage({ searchParams }: FeedPageProps) {
292294 </ p >
293295 < Link
294296 href = "/editor"
297+ prefetch = { false }
295298 className = "mt-4 inline-block font-mono text-xs uppercase tracking-widest text-[var(--foreground)] hover:text-[#CC0000] transition-colors"
296299 >
297300 开始写 →
Original file line number Diff line number Diff line change @@ -147,6 +147,7 @@ function ShareInner() {
147147 </ Button >
148148 < Link
149149 href = "/feed"
150+ prefetch = { false }
150151 className = "inline-flex items-center justify-center px-6 py-2 rounded-none border border-[var(--foreground)] font-mono uppercase tracking-widest text-xs hover:bg-[var(--foreground)] hover:text-[var(--background)] transition-colors"
151152 >
152153 去看看大家分享了啥 →
@@ -226,6 +227,7 @@ function ShareInner() {
226227 < div className = "text-center" >
227228 < Link
228229 href = "/feed"
230+ prefetch = { false }
229231 className = "font-mono text-[10px] uppercase tracking-widest text-neutral-500 hover:text-[var(--foreground)]"
230232 >
231233 跳过,去看看大家分享了啥 →
Original file line number Diff line number Diff line change @@ -102,6 +102,7 @@ export default function UserPostsPage({ params }: PageProps) {
102102 < p > 还没有发布过文章,写第一篇让大家看到你。</ p >
103103 < Link
104104 href = "/editor"
105+ prefetch = { false }
105106 className = "mt-4 inline-block font-mono text-xs uppercase tracking-widest text-[var(--foreground)] hover:text-[#CC0000] transition-colors"
106107 >
107108 去写 →
Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ export default function SharesPage({ params }: PageProps) {
103103 < p > 这是 { username } 的私有分享列表,只有本人登录后可见。</ p >
104104 < Link
105105 href = "/feed"
106+ prefetch = { false }
106107 className = "mt-4 inline-block text-primary underline underline-offset-4"
107108 >
108109 浏览公共分享墙 →
Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ export async function Footer() {
6464 < li >
6565 < Link
6666 href = "/docs/learn/ai"
67+ prefetch = { false }
6768 className = "hover:text-[#CC0000] transition-colors"
6869 data-umami-event = "navigation_click"
6970 data-umami-event-region = "footer"
@@ -75,6 +76,7 @@ export async function Footer() {
7576 < li >
7677 < Link
7778 href = "/docs/learn/cs"
79+ prefetch = { false }
7880 className = "hover:text-[#CC0000] transition-colors"
7981 data-umami-event = "navigation_click"
8082 data-umami-event-region = "footer"
@@ -86,6 +88,7 @@ export async function Footer() {
8688 < li >
8789 < Link
8890 href = "/docs/community"
91+ prefetch = { false }
8992 className = "hover:text-[#CC0000] transition-colors"
9093 data-umami-event = "navigation_click"
9194 data-umami-event-region = "footer"
@@ -97,6 +100,7 @@ export async function Footer() {
97100 < li >
98101 < Link
99102 href = "/docs/career"
103+ prefetch = { false }
100104 className = "hover:text-[#CC0000] transition-colors"
101105 data-umami-event = "navigation_click"
102106 data-umami-event-region = "footer"
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ export async function Header() {
5353 </ Link >
5454 < Link
5555 href = "/feed"
56+ prefetch = { false }
5657 className = "hover:text-[#CC0000] transition-colors"
5758 data-umami-event = "navigation_click"
5859 data-umami-event-region = "header"
Original file line number Diff line number Diff line change @@ -54,6 +54,8 @@ const BOT_PATH_PATTERNS = [
5454 // 常见 admin / debug panels 探测路径(本站 admin 在 /[locale]/admin,
5555 // 这些是其他平台特有路径,扫到必是 bot)
5656 / \/ ( p h p m y a d m i n | a d m i n e r | p m a | d b a d m i n | m y s q l a d m i n ) (?: $ | [ / ? # ] ) / i,
57+ // Tomcat/Spring/Java/Nacos 常见框架扫描与探测路径(无点路径)
58+ / \/ ( a c t u a t o r | d r u i d | n a c o s | t o m c a t | m a n a g e r \/ h t m l | w e b - i n f | s o l r | i n v o k e r ) (?: $ | [ / ? # ] ) / i,
5759] ;
5860
5961function isBotScanPath ( pathname : string ) : boolean {
You can’t perform that action at this time.
0 commit comments