Here is the todo list I want to compose
Common middleware
- Serve static
- CORS
- Compress
- Etag
- Cache
- Secure Headers
- Power By
- Timing(Latency)
- Pretty JSON
- Logger
- Og Image
- Feature Flags
- Cookie
Specific middleware we used
- Superbase Auth
- AuthJs
- Swagger UI
- Valibot/Zod Validator
- assertMethod(req, expected. allowHead?)
- getRequestIp(req)
- getRequestHost(req, opts: { xForwardedHost? })
- getRequestProtocol(req, opts: { xForwardedProto? })
- getValidateQuery(req, validateFn)
- isMethod(req, expected, allowHead?)
- readRawBody(res, encoding)
- readBody(res)
- readFomData(res)
- readMultipartFormData(res)
- readValidatedBody
- appendHeaders(res, headers)
- isStream(data) [Checks if the data is a stream. (Node.js Readable Stream, WebStream or React Pipeable Stream)]
- sendRedirect(res, location, code?)
- sendStream(res, stream)
- sendNoContent(res, code?)
- writeEarlyHints(res, hints, callback)
- handleCacheHeaders(res, opts)
- deleteCookie(res, name, serializeOptions?)
- getCookie(req, name)
- setCookie(res)
- parseCookies(req)
- appendCorsHeaders(res, options)
- appendCorsPrelightHeaders(res, options)
- handleCors(res, options)
- proxyRequest(res, req, opts)
- sendProxy(res, target, opts)