Skip to content

Commit

Permalink
chore: version 0.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
vicanso committed Apr 24, 2024
1 parent 9aff51c commit d685f9f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pingap"
version = "0.2.2"
version = "0.2.3"
authors = ["Tree Xie <[email protected]>"]
edition = "2021"
categories = ["network-programming", "web-programming::http-server"]
Expand Down
16 changes: 12 additions & 4 deletions src/proxy/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,20 @@ impl From<PingapConf> for Vec<ServerConf> {
// load config validate base64
// so ignore error
if let Some(value) = &item.tls_cert {
let buf = STANDARD.decode(value).unwrap_or_default();
tls_cert = Some(buf);
if value.starts_with("-----") {
tls_cert = Some(value.as_bytes().to_vec());
} else {
let buf = STANDARD.decode(value).unwrap_or_default();
tls_cert = Some(buf);
}
}
if let Some(value) = &item.tls_key {
let buf = STANDARD.decode(value).unwrap_or_default();
tls_key = Some(buf);
if value.starts_with("-----") {
tls_key = Some(value.as_bytes().to_vec());
} else {
let buf = STANDARD.decode(value).unwrap_or_default();
tls_key = Some(buf);
}
}

let error_template = if conf.error_template.is_empty() {
Expand Down

0 comments on commit d685f9f

Please sign in to comment.