Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/[locale]/docs/[...slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ async function resolveDocPath(
{
redirect: "manual",
signal: controller.signal,
cache: "no-store",
next: { revalidate: 300 }, // 缓存 5 分钟,防止 bot 扫描频繁触发冷启动与后端查询
// 显式 UA:Vercel SSR 默认出口 UA 可能被 CF bot filter 拦(对齐 feed/page fetchLinks)
headers: {
accept: "application/json",
Expand Down
3 changes: 3 additions & 0 deletions app/[locale]/feed/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -245,13 +245,15 @@ export default async function FeedPage({ searchParams }: FeedPageProps) {
{tab === "links" ? (
<Link
href="/feed/submit"
prefetch={false}
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"
>
+ 丢个链接
</Link>
) : (
<Link
href="/editor"
prefetch={false}
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"
>
+ 写篇文章
Expand Down Expand Up @@ -292,6 +294,7 @@ export default async function FeedPage({ searchParams }: FeedPageProps) {
</p>
<Link
href="/editor"
prefetch={false}
className="mt-4 inline-block font-mono text-xs uppercase tracking-widest text-[var(--foreground)] hover:text-[#CC0000] transition-colors"
>
开始写 →
Expand Down
2 changes: 2 additions & 0 deletions app/[locale]/share/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ function ShareInner() {
</Button>
<Link
href="/feed"
prefetch={false}
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"
>
去看看大家分享了啥 →
Expand Down Expand Up @@ -226,6 +227,7 @@ function ShareInner() {
<div className="text-center">
<Link
href="/feed"
prefetch={false}
className="font-mono text-[10px] uppercase tracking-widest text-neutral-500 hover:text-[var(--foreground)]"
>
跳过,去看看大家分享了啥 →
Expand Down
1 change: 1 addition & 0 deletions app/[locale]/u/[username]/posts/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ export default function UserPostsPage({ params }: PageProps) {
<p>还没有发布过文章,写第一篇让大家看到你。</p>
<Link
href="/editor"
prefetch={false}
className="mt-4 inline-block font-mono text-xs uppercase tracking-widest text-[var(--foreground)] hover:text-[#CC0000] transition-colors"
>
去写 →
Expand Down
1 change: 1 addition & 0 deletions app/[locale]/u/[username]/shares/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ export default function SharesPage({ params }: PageProps) {
<p>这是 {username} 的私有分享列表,只有本人登录后可见。</p>
<Link
href="/feed"
prefetch={false}
className="mt-4 inline-block text-primary underline underline-offset-4"
>
浏览公共分享墙 →
Expand Down
4 changes: 4 additions & 0 deletions app/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export async function Footer() {
<li>
<Link
href="/docs/learn/ai"
prefetch={false}
className="hover:text-[#CC0000] transition-colors"
data-umami-event="navigation_click"
data-umami-event-region="footer"
Expand All @@ -75,6 +76,7 @@ export async function Footer() {
<li>
<Link
href="/docs/learn/cs"
prefetch={false}
className="hover:text-[#CC0000] transition-colors"
data-umami-event="navigation_click"
data-umami-event-region="footer"
Expand All @@ -86,6 +88,7 @@ export async function Footer() {
<li>
<Link
href="/docs/community"
prefetch={false}
className="hover:text-[#CC0000] transition-colors"
data-umami-event="navigation_click"
data-umami-event-region="footer"
Expand All @@ -97,6 +100,7 @@ export async function Footer() {
<li>
<Link
href="/docs/career"
prefetch={false}
className="hover:text-[#CC0000] transition-colors"
data-umami-event="navigation_click"
data-umami-event-region="footer"
Expand Down
1 change: 1 addition & 0 deletions app/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export async function Header() {
</Link>
<Link
href="/feed"
prefetch={false}
className="hover:text-[#CC0000] transition-colors"
data-umami-event="navigation_click"
data-umami-event-region="header"
Expand Down
2 changes: 2 additions & 0 deletions proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ const BOT_PATH_PATTERNS = [
// 常见 admin / debug panels 探测路径(本站 admin 在 /[locale]/admin,
// 这些是其他平台特有路径,扫到必是 bot)
/\/(phpmyadmin|adminer|pma|dbadmin|mysqladmin)(?:$|[/?#])/i,
// Tomcat/Spring/Java/Nacos 常见框架扫描与探测路径(无点路径)
/\/(actuator|druid|nacos|tomcat|manager\/html|web-inf|solr|invoker)(?:$|[/?#])/i,
];

function isBotScanPath(pathname: string): boolean {
Expand Down
Loading