mirror of https://github.com/bra1n/townsquare.git
fix metrics
This commit is contained in:
parent
d9b83a9312
commit
7cc59b05cf
|
@ -219,13 +219,6 @@ if (process.env.NODE_ENV !== "development") {
|
||||||
console.log("server starting");
|
console.log("server starting");
|
||||||
server.listen(8080);
|
server.listen(8080);
|
||||||
server.on("request", (req, res) => {
|
server.on("request", (req, res) => {
|
||||||
if (
|
|
||||||
!["::1", "localhost", "127.0.0.1", "104.248.134.184"].includes(
|
|
||||||
req.connection.remoteAddress
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
return res.end("nothing to see here");
|
|
||||||
}
|
|
||||||
res.setHeader("Content-Type", register.contentType);
|
res.setHeader("Content-Type", register.contentType);
|
||||||
register.metrics().then(out => res.end(out));
|
register.metrics().then(out => res.end(out));
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue