We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a804de5 commit 2591dc1Copy full SHA for 2591dc1
1 file changed
teller-providers/src/providers/hashicorp_vault.rs
@@ -89,11 +89,14 @@ impl Hashivault {
89
90
fn parse_path(pm: &PathMap) -> Result<(&str, &str, &str)> {
91
let (engine, full_path) = (pm.protocol.as_deref().unwrap_or("kv2"), pm.path.as_str());
92
- let (mount, path) = full_path.split_once('/').ok_or_else(|| {
93
- Error::Message(
94
- "path must have initial mount seperated by '/', e.g. `secret/foo`".to_string(),
95
- )
96
- })?;
+ let (mount, path) = full_path
+ .split_once("://")
+ .or_else(|| full_path.split_once('/'))
+ .ok_or_else(|| {
+ Error::Message(
97
+ "path must have initial mount seperated by '/', e.g. `secret/foo`".to_string(),
98
+ )
99
+ })?;
100
Ok((engine, mount, path))
101
}
102
0 commit comments