Skip to content

refactor: remove auth and logging middleware#4884

Merged
steve-chavez merged 1 commit into
PostgREST:mainfrom
steve-chavez:remove-middleware-auth-logger
May 7, 2026
Merged

refactor: remove auth and logging middleware#4884
steve-chavez merged 1 commit into
PostgREST:mainfrom
steve-chavez:remove-middleware-auth-logger

Conversation

@steve-chavez

@steve-chavez steve-chavez commented May 6, 2026

Copy link
Copy Markdown
Member

Continues #4064 and #4062.

I think it's important to do this now before #3140, otherwise we'll accumulate tech debt. It should also make #4831 easier to do.

Benefits:

@steve-chavez steve-chavez force-pushed the remove-middleware-auth-logger branch from 57aef68 to 403b1c6 Compare May 6, 2026 01:32
@steve-chavez steve-chavez requested a review from taimoorzaeem May 6, 2026 01:32
@steve-chavez steve-chavez marked this pull request as ready for review May 6, 2026 01:33
Comment thread src/PostgREST/App.hs Outdated
Comment thread src/PostgREST/Logger.hs Outdated
Comment thread src/PostgREST/Logger.hs Outdated
Comment thread test/spec/Main.hs Outdated
Comment thread src/PostgREST/App.hs Outdated
Comment thread src/PostgREST/App.hs Outdated
@steve-chavez steve-chavez force-pushed the remove-middleware-auth-logger branch 7 times, most recently from 2e468b7 to fe8f1ea Compare May 6, 2026 22:35
Comment thread src/PostgREST/Logger.hs Outdated

@taimoorzaeem taimoorzaeem left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good! 👍

This commit removes auth middleware for it hides
side effects and obscures logic. The auth operations
are now done in its own stage in the request-response
cycle.

It also removes the logging middleware because now
we instead use observation module to log the response.
@steve-chavez steve-chavez force-pushed the remove-middleware-auth-logger branch from fe8f1ea to 5359769 Compare May 7, 2026 16:12
@steve-chavez steve-chavez merged commit 98f8e52 into PostgREST:main May 7, 2026
52 of 53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants