Add array default value to formatting test example 1

This commit is contained in:
Lukas Kalbertodt
2022-10-21 17:21:54 +02:00
parent 3c75b9a325
commit 093957b515
9 changed files with 32 additions and 0 deletions

View File

@@ -46,6 +46,10 @@ pub struct Headers {
/// The header in which the reverse proxy specifies the display name.
#[config(default = "x-display-name")]
pub display_name: String,
/// Headers that are allowed.
#[config(default = ["content-type", "content-encoding"])]
pub allowed: Vec<String>,
}

View File

@@ -30,6 +30,11 @@
//
// Default value: "x-display-name"
//display_name: "x-display-name",
// Headers that are allowed.
//
// Default value: ["content-type","content-encoding"]
//allowed: ["content-type","content-encoding"],
},
},

View File

@@ -31,6 +31,11 @@
# Default value: "x-display-name"
#display_name = "x-display-name"
# Headers that are allowed.
#
# Default value: ["content-type", "content-encoding"]
#allowed = ["content-type", "content-encoding"]
# Configuring the logging.
[log]
# If set to `true`, the app will log to stdout.

View File

@@ -31,6 +31,11 @@ http:
# Default value: x-display-name
#display_name: x-display-name
# Headers that are allowed.
#
# Default value: [content-type, content-encoding]
#allowed: [content-type, content-encoding]
# Configuring the logging.
log:
# If set to `true`, the app will log to stdout.

View File

@@ -31,6 +31,11 @@
# Default value: "x-display-name"
#display_name = "x-display-name"
# Headers that are allowed.
#
# Default value: ["content-type", "content-encoding"]
#allowed = ["content-type", "content-encoding"]
# Configuring the logging.
[log]
# If set to `true`, the app will log to stdout.

View File

@@ -33,6 +33,11 @@
# Default value: "x-display-name"
#display_name = "x-display-name"
# Headers that are allowed.
#
# Default value: ["content-type", "content-encoding"]
#allowed = ["content-type", "content-encoding"]
# Configuring the logging.
[log]

View File

@@ -8,6 +8,7 @@
headers: {
//username: "x-username",
//display_name: "x-display-name",
//allowed: ["content-type","content-encoding"],
},
},

View File

@@ -7,6 +7,7 @@
[http.headers]
#username = "x-username"
#display_name = "x-display-name"
#allowed = ["content-type", "content-encoding"]
[log]
#stdout = true

View File

@@ -7,6 +7,7 @@ http:
headers:
#username: x-username
#display_name: x-display-name
#allowed: [content-type, content-encoding]
log:
#stdout: true