Bring the middleware functionality back into Payload 3.0 #7588
r1tsuu
started this conversation in
Feature Requests & Ideas
Replies: 1 comment 3 replies
-
Could you please provide some context on how the 3.0 version operates different from Payload 2.0? I have no hands-on experience (yet) with version 3.0, but your remark sounds valuable to me. Removing the option to add middleware sounds like a step towards blackboxing, which sounds contradictory to Payloads (publicly communicated) philosophy/vision. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Something that I haven't seen discussed, but I think we should be able to apply middlewares just like we did with 2.0 and Express.
Examples of the usage:
Logging, analytics, caching, custom endpoints specific authentication / context modification (DRY)
Express
next
function could be replaced with this logic:Response
from our middleware, the next middleware / actual handler will be executed with passedreq
through. It would be also nice to be able here to modify headers of the future response.Response
- exit the execution contextBeta Was this translation helpful? Give feedback.
All reactions