[PR #6947] [CLOSED] test: improve coverage for isTrustedOrigin #6981

Closed
opened 2026-03-13 13:20:02 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6947
Author: @himself65
Created: 12/23/2025
Status: Closed

Base: canaryHead: himself65/2025/12/23/origin-check


📝 Commits (1)

  • a70169b test: improve coverage for isTrustedOrigin

📊 Changes

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

View changed files

📝 packages/better-auth/src/auth/trusted-origins.test.ts (+19 -0)

📄 Description

Related: https://github.com/better-auth/better-auth/issues/6944


Summary by cubic

Expanded test coverage for isTrustedOrigin to verify allowed localhost and LAN origins are accepted, with and without trailing slashes. Adds cases for ports 5173/5174 on localhost and 192.168.178.71.

Written for commit a70169bf2a. Summary will update automatically on new commits.


🔄 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/6947 **Author:** [@himself65](https://github.com/himself65) **Created:** 12/23/2025 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `himself65/2025/12/23/origin-check` --- ### 📝 Commits (1) - [`a70169b`](https://github.com/better-auth/better-auth/commit/a70169bf2a54b40fb0c8ff4f17935c7f1923e654) test: improve coverage for `isTrustedOrigin` ### 📊 Changes **1 file changed** (+19 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/auth/trusted-origins.test.ts` (+19 -0) </details> ### 📄 Description Related: https://github.com/better-auth/better-auth/issues/6944 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Expanded test coverage for isTrustedOrigin to verify allowed localhost and LAN origins are accepted, with and without trailing slashes. Adds cases for ports 5173/5174 on localhost and 192.168.178.71. <sup>Written for commit a70169bf2a54b40fb0c8ff4f17935c7f1923e654. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <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 13:20:02 -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#6981