add request header override option
This commit is contained in:
parent
e16ad423d5
commit
b0a9b6b5f8
10 changed files with 104 additions and 18 deletions
|
|
@ -40,15 +40,16 @@ pub struct TlsOption {
|
|||
#[derive(Deserialize, Debug, Default)]
|
||||
pub struct ReverseProxyOption {
|
||||
pub path: Option<String>,
|
||||
pub upstream: Vec<UpstreamOption>,
|
||||
pub upstream: Vec<UpstreamParams>,
|
||||
pub upstream_options: Option<Vec<String>>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug, Default)]
|
||||
pub struct UpstreamOption {
|
||||
pub struct UpstreamParams {
|
||||
pub location: String,
|
||||
pub tls: Option<bool>,
|
||||
}
|
||||
impl UpstreamOption {
|
||||
impl UpstreamParams {
|
||||
pub fn to_uri(&self) -> Result<hyper::Uri> {
|
||||
let mut scheme = "http";
|
||||
if let Some(t) = self.tls {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue