Skip to content

fix(api): rename /alerts/event/error to /alerts/event-errors#5640

Closed
MekonMAC wants to merge 1 commit intokeephq:mainfrom
MekonMAC:fix/5521-oauth2-redirect-loop-rename-error-endpoint-v2
Closed

fix(api): rename /alerts/event/error to /alerts/event-errors#5640
MekonMAC wants to merge 1 commit intokeephq:mainfrom
MekonMAC:fix/5521-oauth2-redirect-loop-rename-error-endpoint-v2

Conversation

@MekonMAC
Copy link
Copy Markdown
Contributor

Fixes #5521.

This PR renames the GET endpoint /alerts/event/error to /alerts/event-errors (and its corresponding dismiss endpoint).

Problem:
When using OAuth2-proxy (or similar auth proxies), users often bypass auth for webhook endpoints using a regex like /alerts/event.*. Because /alerts/event/error starts with the same prefix but is a frontend GET request requiring user authentication, it gets caught in the bypass. This leads to the backend receiving requests without user headers, returning 401/403, and triggering a redirect loop in the UI.

Solution:
Renaming the endpoint to /alerts/event-errors removes the collision with the webhook ingestion path prefix, allowing auth proxies to correctly distinguish between public webhooks and private API calls.

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 17, 2026

Someone is attempting to deploy a commit to the KeepHQ Team on Vercel.

A member of the Team first needs to authorize it.

@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Feb 17, 2026
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Feb 17, 2026

CLA assistant check
All committers have signed the CLA.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Feb 17, 2026

Target branch is not in the allowed branches list.

@dosubot dosubot Bot added the API API related issues label Feb 17, 2026
@MekonMAC MekonMAC force-pushed the fix/5521-oauth2-redirect-loop-rename-error-endpoint-v2 branch from edbdf62 to ed9c806 Compare February 19, 2026 09:49
@MekonMAC
Copy link
Copy Markdown
Contributor Author

Hi Team! It seems that the CI for this PR is failing due to some global issues in the main branch:

  1. Release JSON Schema: Failing with npm error Missing: @types/react (mismatch between package.json and lock file).
  2. Unit Tests: Failing with RecursionError: maximum recursion depth exceeded in keep/api/api.py.

Could you please take a look at these infrastructure/main-branch issues? Once fixed, I'll rebase my PR. Thanks! 🚀

@MekonMAC
Copy link
Copy Markdown
Contributor Author

MekonMAC commented Mar 4, 2026

Hi team, just following up on the CI failures for this PR. Are there any updates on the main branch infrastructure issues? Thanks! @MekonMAC

@shahargl
Copy link
Copy Markdown
Member

shahargl commented Apr 5, 2026

Closing: AI-generated spam.

@shahargl shahargl closed this Apr 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API API related issues size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[🐛 Bug]: OAuth2-proxy authentication causes redirect loop due to /alerts/event/error endpoint

3 participants