cleartext backend request will be http1.1
This commit is contained in:
parent
c5c7847b92
commit
e76ac95062
5 changed files with 16 additions and 13 deletions
|
|
@ -4,8 +4,8 @@ use crate::error::*;
|
|||
pub enum UpstreamOption {
|
||||
OverrideHost,
|
||||
UpgradeInsecureRequests,
|
||||
ConvertToHttp11,
|
||||
ConvertToHttp2,
|
||||
ConvertHttpsTo11,
|
||||
ConvertHttpsTo2,
|
||||
// TODO: Adds more options for heder override
|
||||
}
|
||||
impl TryFrom<&str> for UpstreamOption {
|
||||
|
|
@ -14,8 +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),
|
||||
"convert_https_to_11" => Ok(Self::ConvertHttpsTo11),
|
||||
"convert_https_to_2" => Ok(Self::ConvertHttpsTo2),
|
||||
_ => Err(RpxyError::Other(anyhow!("Unsupported header option"))),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue