[PR #3707] [MERGED] docs(hono): clarify CORS middleware must be registered before routes #13212

Closed
opened 2026-04-13 08:49:33 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/3707
Author: @braden-w
Created: 7/30/2025
Status: Merged
Merged: 7/31/2025
Merged by: @Kinfe123

Base: mainHead: docs/hono-cors-ordering


📝 Commits (1)

  • 43eebc7 docs(hono): clarify CORS middleware must be registered before routes

📊 Changes

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

View changed files

📝 docs/content/docs/integrations/hono.mdx (+6 -0)

📄 Description

The CORS section in the Hono integration documentation was truncated, only showing the app.use() for CORS configuration but not including the subsequent app.on() and serve() calls.

This could confuse users who might add the app.use() after the app.on() call (which would be out of order). Furthermore, the Middleware example right below the CORS example includes the app.on() and serve() calls.

I added the missing app.on() and serve() calls to the CORS example to keep things consistent, and included a note explaining that CORS middleware must be registered before routes.


🔄 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/3707 **Author:** [@braden-w](https://github.com/braden-w) **Created:** 7/30/2025 **Status:** ✅ Merged **Merged:** 7/31/2025 **Merged by:** [@Kinfe123](https://github.com/Kinfe123) **Base:** `main` ← **Head:** `docs/hono-cors-ordering` --- ### 📝 Commits (1) - [`43eebc7`](https://github.com/better-auth/better-auth/commit/43eebc742e4abbfc206e1f18a3b2178616bc59af) docs(hono): clarify CORS middleware must be registered before routes ### 📊 Changes **1 file changed** (+6 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/integrations/hono.mdx` (+6 -0) </details> ### 📄 Description The CORS section in the Hono integration documentation was truncated, only showing the `app.use()` for CORS configuration but not including the subsequent `app.on()` and `serve()` calls. This could confuse users who might add the `app.use()` after the `app.on()` call (which would be out of order). Furthermore, the Middleware example right below the CORS example includes the `app.on()` and `serve()` calls. I added the missing `app.on()` and `serve()` calls to the CORS example to keep things consistent, and included a note explaining that CORS middleware must be registered before routes. --- <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-04-13 08:49:33 -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#13212