Skip to content

Commit 8ada510

Browse files
Techbot121Meta Construct
authored and
Meta Construct
committed
fix not detecting the discordbot
1 parent 634d541 commit 8ada510

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/services/webapp/api/game-server-status.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ export default async (webApp: WebApp): Promise<void> => {
1919
}
2020

2121
// Discord Bot and Cloudflare
22-
const discordBot = req.headers.accept == "*/*" || !req.headers.accept;
22+
const discordBot =
23+
req.headers.accept == "*/*" ||
24+
!req.headers.accept ||
25+
req.headers["user-agent"]?.includes("+https://discordapp.com");
2326

2427
const html = pug.renderFile(
2528
path.join(process.cwd(), "resources/game-server-status/view.pug"),

0 commit comments

Comments
 (0)