RequestID 中间件

RequestID 中间件会为Response Header http信息头添加UUID,header key: “X-Request-ID”

  1. YoyoGo.NewWebHostBuilder().
  2. UseConfiguration(configuration).
  3. Configure(func(app *YoyoGo.WebApplicationBuilder) {
  4. app.UseMiddleware(Middleware.NewRequestID())
  5. }
  6. }