Skip to content

Commit

Permalink
edging my brain anneurism (pt. 13)
Browse files Browse the repository at this point in the history
  • Loading branch information
spectrapulse committed May 11, 2024
1 parent 1cc3b96 commit e9e6b86
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
async fn main() -> std::io::Result<()> {
println!("Running server!");

let _env_vars = ["UDS", "BIND_UNIX", "PROXY", "PROXY_USER", "PROXY_PASS"];
for v in _env_vars.into_iter{

Check failure on line 31 in src/main.rs

View workflow job for this annotation

GitHub Actions / build (amd64)

attempted to take value of method `into_iter` on type `[&str; 5]`

Check failure on line 31 in src/main.rs

View workflow job for this annotation

GitHub Actions / build (arm64v8)

attempted to take value of method `into_iter` on type `[&str; 5]`
println!(
"{var_name}: {var_value}",
var_name=v,
var_value=env::var("BIND_UNIX")
.unwrap_or_else(|_| "NUL".to_string())
);
}

let server = HttpServer::new(|| {
// match all requests
App::new().default_service(web::to(index))
Expand Down Expand Up @@ -65,7 +75,6 @@ static CLIENT: Lazy<Client> = Lazy::new(|| {
let builder = if let Some(proxy) = proxy {
// proxy basic auth
if let Ok(proxy_auth_user) = env::var("PROXY_USER") {
println!("PROXY_USER: {}", proxy_auth_user); // debug
let proxy_auth_pass = env::var("PROXY_PASS").unwrap_or_default();
builder.proxy(proxy.basic_auth(&proxy_auth_user, &proxy_auth_pass))
} else {
Expand Down

0 comments on commit e9e6b86

Please sign in to comment.