Skip to content

Commit

Permalink
chore: version 0.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
vicanso committed May 2, 2024
1 parent 585e5ac commit d37b05c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 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.3.2"
version = "0.3.3"
authors = ["Tree Xie <[email protected]>"]
edition = "2021"
categories = ["network-programming", "web-programming::http-server"]
Expand Down
9 changes: 9 additions & 0 deletions src/config/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// limitations under the License.

use super::{Error, Result};
use crate::proxy::Parser;
use crate::util;
use base64::{engine::general_purpose::STANDARD, Engine};
use http::{HeaderName, HeaderValue};
Expand Down Expand Up @@ -256,6 +257,14 @@ impl ServerConf {
.map_err(|e| Error::Base64Decode { source: e })?;
}
}
if let Some(access_log) = &self.access_log {
let logger = Parser::from(access_log.as_str());
if logger.tags.is_empty() {
return Err(Error::Invalid {
message: "Access log format is invalid".to_string(),
});
}
}

Ok(())
}
Expand Down

0 comments on commit d37b05c

Please sign in to comment.