remove GET endpoint, handled by nginx proxy
This commit is contained in:
parent
538f40f384
commit
ef3a6d411a
|
@ -85,22 +85,6 @@ export class Server {
|
|||
this.app.post("/siafile", this.handleSiafilePOST.bind(this))
|
||||
this.app.post("/skyfile", this.handleSkyfilePOST.bind(this))
|
||||
|
||||
this.app.get(
|
||||
"/skylink/:hash",
|
||||
proxy("http://127.0.0.1:9980/skynet/skylink/", {
|
||||
proxyReqOptDecorator: (opts, _) => {
|
||||
opts.headers["User-Agent"] = "Sia-Agent"
|
||||
return opts
|
||||
},
|
||||
proxyReqPathResolver: req => {
|
||||
const { hash } = req.params
|
||||
return req.query && req.query.attachment
|
||||
? `/skynet/skylink/${hash}?attachment=true`
|
||||
: `/skynet/skylink/${hash}`
|
||||
}
|
||||
})
|
||||
)
|
||||
|
||||
this.app.get(
|
||||
"/stats", this.handleStatsGET.bind(this)
|
||||
// TODO: redirect to protalstats
|
||||
|
|
Reference in New Issue