diff --git a/packages/siaviewnode-server/src/main.ts b/packages/siaviewnode-server/src/main.ts index 2f1df899..fafdc5bf 100644 --- a/packages/siaviewnode-server/src/main.ts +++ b/packages/siaviewnode-server/src/main.ts @@ -117,6 +117,17 @@ export class Server { }) ) + this.app.get( + "/stats", this.handleStatsGET.bind(this) + // TODO: redirect to protalstats + // proxy("http://localhost:9980/renter/portalstats", { + // proxyReqOptDecorator: (opts, _) => { + // opts.headers["User-Agent"] = "Sia-Agent" + // return opts + // }, + // }) + ) + this.app.get( "/web/:hash", (req: Request, res: Response) => { const { hash } = req.params @@ -133,16 +144,6 @@ export class Server { } ) - this.app.get( - "/stats", this.handleStatsGET.bind(this) - // TODO: redirect to protalstats - // proxy("http://localhost:9980/renter/portalstats", { - // proxyReqOptDecorator: (opts, _) => { - // opts.headers["User-Agent"] = "Sia-Agent" - // return opts - // }, - // }) - ) } private async handleStatsGET(req: Request, res: Response): Promise {