@@ -331,7 +331,7 @@ macro_rules! make_config {
331
331
}
332
332
}
333
333
} } ;
334
- ( @build $value: expr, $config: expr, gen , $default_fn: expr ) => { {
334
+ ( @build $value: expr, $config: expr, generated , $default_fn: expr ) => { {
335
335
let f: & dyn Fn ( & ConfigItems ) -> _ = & $default_fn;
336
336
f( $config)
337
337
} } ;
@@ -349,10 +349,10 @@ macro_rules! make_config {
349
349
// }
350
350
//
351
351
// Where action applied when the value wasn't provided and can be:
352
- // def: Use a default value
353
- // auto: Value is auto generated based on other values
354
- // option: Value is optional
355
- // gen: Value is always autogenerated and it's original value ignored
352
+ // def: Use a default value
353
+ // auto: Value is auto generated based on other values
354
+ // option: Value is optional
355
+ // generated: Value is always autogenerated and it's original value ignored
356
356
make_config ! {
357
357
folders {
358
358
/// Data folder |> Main data folder
@@ -515,7 +515,7 @@ make_config! {
515
515
/// Set to the string "none" (without quotes), to disable any headers and just use the remote IP
516
516
ip_header: String , true , def, "X-Real-IP" . to_string( ) ;
517
517
/// Internal IP header property, used to avoid recomputing each time
518
- _ip_header_enabled: bool , false , gen , |c| & c. ip_header. trim( ) . to_lowercase( ) != "none" ;
518
+ _ip_header_enabled: bool , false , generated , |c| & c. ip_header. trim( ) . to_lowercase( ) != "none" ;
519
519
/// Icon service |> The predefined icon services are: internal, bitwarden, duckduckgo, google.
520
520
/// To specify a custom icon service, set a URL template with exactly one instance of `{}`,
521
521
/// which is replaced with the domain. For example: `https://icon.example.com/domain/{}`.
@@ -524,9 +524,9 @@ make_config! {
524
524
/// corresponding icon at the external service.
525
525
icon_service: String , false , def, "internal" . to_string( ) ;
526
526
/// _icon_service_url
527
- _icon_service_url: String , false , gen , |c| generate_icon_service_url( & c. icon_service) ;
527
+ _icon_service_url: String , false , generated , |c| generate_icon_service_url( & c. icon_service) ;
528
528
/// _icon_service_csp
529
- _icon_service_csp: String , false , gen , |c| generate_icon_service_csp( & c. icon_service, & c. _icon_service_url) ;
529
+ _icon_service_csp: String , false , generated , |c| generate_icon_service_csp( & c. icon_service, & c. _icon_service_url) ;
530
530
/// Icon redirect code |> The HTTP status code to use for redirects to an external icon service.
531
531
/// The supported codes are 301 (legacy permanent), 302 (legacy temporary), 307 (temporary), and 308 (permanent).
532
532
/// Temporary redirects are useful while testing different icon services, but once a service
@@ -624,7 +624,7 @@ make_config! {
624
624
/// WARNING: This could cause issues with clients. Also exports will not work on Bitwarden servers!
625
625
increase_note_size_limit: bool , true , def, false ;
626
626
/// Generated max_note_size value to prevent if..else matching during every check
627
- _max_note_size: usize , false , gen , |c| if c. increase_note_size_limit { 100_000 } else { 10_000 } ;
627
+ _max_note_size: usize , false , generated , |c| if c. increase_note_size_limit { 100_000 } else { 10_000 } ;
628
628
629
629
/// Enforce Single Org with Reset Password Policy |> Enforce that the Single Org policy is enabled before setting the Reset Password policy
630
630
/// Bitwarden enforces this by default. In Vaultwarden we encouraged to use multiple organizations because groups were not available.
@@ -695,7 +695,7 @@ make_config! {
695
695
/// Embed images as email attachments.
696
696
smtp_embed_images: bool , true , def, true ;
697
697
/// _smtp_img_src
698
- _smtp_img_src: String , false , gen , |c| generate_smtp_img_src( c. smtp_embed_images, & c. domain) ;
698
+ _smtp_img_src: String , false , generated , |c| generate_smtp_img_src( c. smtp_embed_images, & c. domain) ;
699
699
/// Enable SMTP debugging (Know the risks!) |> DANGEROUS: Enabling this will output very detailed SMTP messages. This could contain sensitive information like passwords and usernames! Only enable this during troubleshooting!
700
700
smtp_debug: bool , false , def, false ;
701
701
/// Accept Invalid Certs (Know the risks!) |> DANGEROUS: Allow invalid certificates. This option introduces significant vulnerabilities to man-in-the-middle attacks!
0 commit comments