[PR #5425] [MERGED] docs: support explicit .mdx URLs in llms.txt routes #6000

Closed
opened 2026-03-13 12:44:14 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/5425
Author: @aryasaatvik
Created: 10/20/2025
Status: Merged
Merged: 10/20/2025
Merged by: @himself65

Base: canaryHead: fix/llms-mdx-extension-support


📝 Commits (1)

  • 484cb8b fix(proxy): update markdown preference check to exclude 'mdx' files

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 docs/proxy.ts (+1 -1)

📄 Description

Summary

Enables LLM integrations to request documentation using explicit .mdx file extensions in URLs.

Changes

  • Updated the proxy matcher in docs/proxy.ts to exclude paths ending with .mdx
  • Uses negative lookahead regex pattern to prevent proxying of .mdx URLs
  • Allows URLs like /docs/authentication.mdx to reach the route handler directly

Why

LLMs sometimes include file extensions when requesting documentation. This change ensures both /docs/page and /docs/page.mdx work seamlessly.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/5425 **Author:** [@aryasaatvik](https://github.com/aryasaatvik) **Created:** 10/20/2025 **Status:** ✅ Merged **Merged:** 10/20/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `fix/llms-mdx-extension-support` --- ### 📝 Commits (1) - [`484cb8b`](https://github.com/better-auth/better-auth/commit/484cb8b09198b6d26ad3bb325983dbade23400e7) fix(proxy): update markdown preference check to exclude 'mdx' files ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `docs/proxy.ts` (+1 -1) </details> ### 📄 Description ## Summary Enables LLM integrations to request documentation using explicit `.mdx` file extensions in URLs. ## Changes - Updated the proxy matcher in `docs/proxy.ts` to exclude paths ending with `.mdx` - Uses negative lookahead regex pattern to prevent proxying of `.mdx` URLs - Allows URLs like `/docs/authentication.mdx` to reach the route handler directly ## Why LLMs sometimes include file extensions when requesting documentation. This change ensures both `/docs/page` and `/docs/page.mdx` work seamlessly. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-13 12:44:14 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#6000