@@ -204,8 +204,10 @@ func New(options *Options) *API {
204
204
})
205
205
206
206
r .Use (
207
- httpmw .AttachRequestID ,
208
207
httpmw .Recover (api .Logger ),
208
+ tracing .StatusWriterMiddleware ,
209
+ tracing .Middleware (api .TracerProvider ),
210
+ httpmw .AttachRequestID ,
209
211
httpmw .ExtractRealIP (api .RealIPConfig ),
210
212
httpmw .Logger (api .Logger ),
211
213
httpmw .Prometheus (options .PrometheusRegistry ),
@@ -239,7 +241,6 @@ func New(options *Options) *API {
239
241
240
242
apps := func (r chi.Router ) {
241
243
r .Use (
242
- tracing .Middleware (api .TracerProvider ),
243
244
httpmw .RateLimit (options .APIRateLimit , time .Minute ),
244
245
httpmw .ExtractAPIKey (httpmw.ExtractAPIKeyConfig {
245
246
DB : options .Database ,
@@ -287,7 +288,6 @@ func New(options *Options) *API {
287
288
288
289
r .NotFound (func (rw http.ResponseWriter , r * http.Request ) { httpapi .RouteNotFound (rw ) })
289
290
r .Use (
290
- tracing .Middleware (api .TracerProvider ),
291
291
// Specific routes can specify smaller limits.
292
292
httpmw .RateLimit (options .APIRateLimit , time .Minute ),
293
293
)
@@ -508,14 +508,6 @@ func New(options *Options) *API {
508
508
r .Get ("/listening-ports" , api .workspaceAgentListeningPorts )
509
509
r .Get ("/connection" , api .workspaceAgentConnection )
510
510
r .Get ("/coordinate" , api .workspaceAgentClientCoordinate )
511
- // TODO: This can be removed in October. It allows for a friendly
512
- // error message when transitioning from WebRTC to Tailscale. See:
513
- // https://github.com/coder/coder/issues/4126
514
- r .Get ("/dial" , func (w http.ResponseWriter , r * http.Request ) {
515
- httpapi .Write (r .Context (), w , http .StatusGone , codersdk.Response {
516
- Message : "Your Coder CLI is out of date, and requires v0.8.15+ to connect!" ,
517
- })
518
- })
519
511
})
520
512
})
521
513
r .Route ("/workspaces" , func (r chi.Router ) {
0 commit comments