mirror of
https://codeberg.org/VnPower/PixivFE
synced 2024-12-06 19:16:23 +01:00
15 lines
754 B
Go
15 lines
754 B
Go
/*
|
|
Package middleware provides HTTP request handling functionality for PixivFE.
|
|
It defines various middleware functions, request handlers, and routing logic to manage
|
|
incoming HTTP requests and produce appropriate responses.
|
|
|
|
The package includes middleware for security headers (SetPrivacyHeaders), error catching
|
|
and handling (CatchError, HandleError), rate limiting (IPRateLimiter, RateLimitRequest), logging (LogRequest),
|
|
and user context injection (ProvideUserContext). These middlewares can be applied to routes to add cross-cutting
|
|
functionality across multiple endpoints.
|
|
|
|
Route definitions are centralized in the DefineRoutes function, which sets up all paths
|
|
and their corresponding handlers using the gorilla/mux router.
|
|
*/
|
|
package middleware
|