Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add prevalent middlewares #25

Merged
merged 2 commits into from
Jan 16, 2025
Merged

Add prevalent middlewares #25

merged 2 commits into from
Jan 16, 2025

Conversation

sevein
Copy link
Member

@sevein sevein commented Nov 28, 2024

This pull request introduces the middleware package, which includes a few HTTP handlers (similar to https://github.com/gorilla/handlers) that are commonly used across our projects:

  • middleware.Recover
  • middleware.VersionHeader
  • middleware.WriteTimeout

Seen in:

In further PRs:

  • Investigate replacement of goahttpmwr.RequestID() (deprecated)
  • Investigate replacement of goahttpmwr.Log() (deprecated)

@sevein sevein force-pushed the dev/add-common-middlewares branch 4 times, most recently from d833830 to 1e5d9e9 Compare November 29, 2024 10:43
@sevein sevein marked this pull request as ready for review November 29, 2024 10:45
@sevein sevein force-pushed the dev/add-common-middlewares branch from 1e5d9e9 to f2cf876 Compare November 29, 2024 10:49
Copy link
Contributor

@djjuhasz djjuhasz left a comment

Choose a reason for hiding this comment

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

Yeah, looks okay to me, but the details are all way beyond my knowledge of how http handlers work in Go. 🤷

middleware/recover.go Outdated Show resolved Hide resolved
@sevein sevein force-pushed the dev/add-common-middlewares branch from f2cf876 to b41182e Compare January 16, 2025 17:21
@sevein sevein merged commit 38728c0 into main Jan 16, 2025
6 checks passed
@sevein sevein deleted the dev/add-common-middlewares branch January 16, 2025 17:33
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.

2 participants