mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-06 10:11:44 +00:00
update dependencies (#4639)
## Issue Addressed updates underlying dependencies and removes the ignored `RUSTSEC`'s for `cargo audit`. Also switches `procinfo` to `procfs` on `eth2` to remove the `nom` warning, `procinfo` is unmaintained see [here](https://github.com/danburkert/procinfo-rs/issues/46).
This commit is contained in:
@@ -10,10 +10,14 @@ pub fn set_builder_origins(
|
||||
default_origin: (IpAddr, u16),
|
||||
) -> Result<Builder, String> {
|
||||
if let Some(allow_origin) = allow_origin {
|
||||
let origins = allow_origin
|
||||
.split(',')
|
||||
.map(|s| verify_cors_origin_str(s).map(|_| s))
|
||||
.collect::<Result<Vec<_>, _>>()?;
|
||||
let mut origins = vec![];
|
||||
for origin in allow_origin.split(',') {
|
||||
verify_cors_origin_str(origin)?;
|
||||
if origin == "*" {
|
||||
return Ok(builder.allow_any_origin());
|
||||
}
|
||||
origins.push(origin)
|
||||
}
|
||||
Ok(builder.allow_origins(origins))
|
||||
} else {
|
||||
let origin = match default_origin.0 {
|
||||
|
||||
@@ -87,7 +87,7 @@ pub fn scrape_process_health_metrics() {
|
||||
// This will silently fail if we are unable to observe the health. This is desired behaviour
|
||||
// since we don't support `Health` for all platforms.
|
||||
if let Ok(health) = ProcessHealth::observe() {
|
||||
set_gauge(&PROCESS_NUM_THREADS, health.pid_num_threads as i64);
|
||||
set_gauge(&PROCESS_NUM_THREADS, health.pid_num_threads);
|
||||
set_gauge(&PROCESS_RES_MEM, health.pid_mem_resident_set_size as i64);
|
||||
set_gauge(&PROCESS_VIRT_MEM, health.pid_mem_virtual_memory_size as i64);
|
||||
set_gauge(&PROCESS_SECONDS, health.pid_process_seconds_total as i64);
|
||||
|
||||
Reference in New Issue
Block a user