add version setting of request forwarded
This commit is contained in:
parent
f24f059d45
commit
c5c7847b92
6 changed files with 43 additions and 9 deletions
|
|
@ -4,6 +4,8 @@ use crate::error::*;
|
|||
pub enum UpstreamOption {
|
||||
OverrideHost,
|
||||
UpgradeInsecureRequests,
|
||||
ConvertToHttp11,
|
||||
ConvertToHttp2,
|
||||
// TODO: Adds more options for heder override
|
||||
}
|
||||
impl TryFrom<&str> for UpstreamOption {
|
||||
|
|
@ -12,6 +14,8 @@ impl TryFrom<&str> for UpstreamOption {
|
|||
match val {
|
||||
"override_host" => Ok(Self::OverrideHost),
|
||||
"upgrade_insecure_requests" => Ok(Self::UpgradeInsecureRequests),
|
||||
"convert_to_http11" => Ok(Self::ConvertToHttp11),
|
||||
"convert_to_http2" => Ok(Self::ConvertToHttp2),
|
||||
_ => Err(RpxyError::Other(anyhow!("Unsupported header option"))),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue