Skip to content

Commit

Permalink
chore(server): set Content-Type header (#1651)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbruens authored Mar 10, 2025
1 parent d9aa856 commit 9013fea
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/shadowbox/server/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ const MMDB_LOCATION_ASN = '/var/lib/libmaxminddb/ip-asn.mmdb';
async function exportPrometheusMetrics(registry: prometheus.Registry, port): Promise<http.Server> {
return new Promise<http.Server>((resolve, _) => {
const server = http.createServer((_, res) => {
res.setHeader('Content-Type', registry.contentType);
res.write(registry.metrics());
res.end();
});
Expand Down

0 comments on commit 9013fea

Please sign in to comment.