Skip to content

fix: return 401 instead of 404 for disallowed public requests#2034

Merged
timbastin merged 1 commit into
mainfrom
fix/public-request-unauthorized
May 21, 2026
Merged

fix: return 401 instead of 404 for disallowed public requests#2034
timbastin merged 1 commit into
mainfrom
fix/public-request-unauthorized

Conversation

@refoo0
Copy link
Copy Markdown
Member

@refoo0 refoo0 commented May 20, 2026

No description provided.

Signed-off-by: rafi <refaei.shikho@hotmail.com>
Copilot AI review requested due to automatic review settings May 20, 2026 17:37
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the access-control middleware behavior so disallowed “public” requests are rejected with an authentication-style response instead of being masked as “not found”.

Changes:

  • Changed DisallowPublicRequests to return HTTP 401 (instead of 404) when a request is flagged as public.
  • Updated the error message to explicitly indicate the endpoint is not accessible for public requests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@timbastin timbastin merged commit 4c872b6 into main May 21, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants