Skip to content

Commit 9186e20

Browse files
committed
chore(blog): tweak feed request headers
1 parent c3bfa4d commit 9186e20

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/blog.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,14 @@ export async function getLatestBlogPosts(limit = 3): Promise<BlogPost[]> {
8888
try {
8989
const response = await fetch("https://rustfs.dev/feed", {
9090
next: { revalidate: 1800 },
91+
// Some WordPress/security setups block default Node/undici user agents from CI/CD.
92+
// Use a browser-like User-Agent and explicit Accept header to reduce false positives.
93+
headers: {
94+
"User-Agent":
95+
"Mozilla/5.0 (compatible; RustFSSiteBot/1.0; +https://rustfs.com)",
96+
Accept:
97+
"application/rss+xml, application/xml;q=0.9, text/xml;q=0.8, */*;q=0.7",
98+
},
9199
});
92100

93101
if (!response.ok) {

0 commit comments

Comments
 (0)