This commit is contained in:
parent
58645ec2b2
commit
417ea7b84d
@ -29,6 +29,7 @@ export default class ProxyRoute extends Route {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
const before = Date.now();
|
||||||
const response = await node.fetch(url);
|
const response = await node.fetch(url);
|
||||||
const data = response.data;
|
const data = response.data;
|
||||||
|
|
||||||
@ -39,7 +40,9 @@ export default class ProxyRoute extends Route {
|
|||||||
|
|
||||||
// Log the request
|
// Log the request
|
||||||
console.log(
|
console.log(
|
||||||
`[${response.headers["X-Proxy-Node"]}] ${url} - ${response.status}`
|
`[node: ${response.headers["x-proxy-node"]}] ${url} - ${
|
||||||
|
response.status
|
||||||
|
} (${Date.now() - before}ms)`
|
||||||
);
|
);
|
||||||
|
|
||||||
// Return the JSON response
|
// Return the JSON response
|
||||||
|
Loading…
Reference in New Issue
Block a user