mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
Replace default with custom prometheus registry
The default prometheus registry exports data that may be useful for side-channel attacks. This removes all of the default metrics and makes sure we are only reporting snowflake metrics from the broker.
This commit is contained in:
parent
2a310682b5
commit
af6e2c30e1
2 changed files with 9 additions and 10 deletions
|
@ -506,9 +506,7 @@ func main() {
|
|||
http.Handle("/answer", SnowflakeHandler{ctx, proxyAnswers})
|
||||
http.Handle("/debug", SnowflakeHandler{ctx, debugHandler})
|
||||
http.Handle("/metrics", MetricsHandler{metricsFilename, metricsHandler})
|
||||
http.Handle("/prometheus", promhttp.Handler())
|
||||
|
||||
InitPrometheus()
|
||||
http.Handle("/prometheus", promhttp.HandlerFor(promMetrics.registry, promhttp.HandlerOpts{}))
|
||||
|
||||
server := http.Server{
|
||||
Addr: addr,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue