mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 02:57:59 +00:00
Add HTTP response headers for hostname and raft node ID (if applicable) (#11289)
This commit is contained in:
@@ -441,6 +441,11 @@ func testLoadConfigFile(t *testing.T) {
|
||||
MaxLeaseTTLRaw: "10h",
|
||||
DefaultLeaseTTL: 10 * time.Hour,
|
||||
DefaultLeaseTTLRaw: "10h",
|
||||
|
||||
EnableResponseHeaderHostname: true,
|
||||
EnableResponseHeaderHostnameRaw: true,
|
||||
EnableResponseHeaderRaftNodeID: true,
|
||||
EnableResponseHeaderRaftNodeIDRaw: true,
|
||||
}
|
||||
|
||||
addExpectedEntConfig(expected, []string{})
|
||||
@@ -606,23 +611,25 @@ func testConfig_Sanitized(t *testing.T) {
|
||||
sanitizedConfig := config.Sanitized()
|
||||
|
||||
expected := map[string]interface{}{
|
||||
"api_addr": "top_level_api_addr",
|
||||
"cache_size": 0,
|
||||
"cluster_addr": "top_level_cluster_addr",
|
||||
"cluster_cipher_suites": "",
|
||||
"cluster_name": "testcluster",
|
||||
"default_lease_ttl": 10 * time.Hour,
|
||||
"default_max_request_duration": 0 * time.Second,
|
||||
"disable_cache": true,
|
||||
"disable_clustering": false,
|
||||
"disable_indexing": false,
|
||||
"disable_mlock": true,
|
||||
"disable_performance_standby": false,
|
||||
"disable_printable_check": false,
|
||||
"disable_sealwrap": true,
|
||||
"raw_storage_endpoint": true,
|
||||
"disable_sentinel_trace": true,
|
||||
"enable_ui": true,
|
||||
"api_addr": "top_level_api_addr",
|
||||
"cache_size": 0,
|
||||
"cluster_addr": "top_level_cluster_addr",
|
||||
"cluster_cipher_suites": "",
|
||||
"cluster_name": "testcluster",
|
||||
"default_lease_ttl": 10 * time.Hour,
|
||||
"default_max_request_duration": 0 * time.Second,
|
||||
"disable_cache": true,
|
||||
"disable_clustering": false,
|
||||
"disable_indexing": false,
|
||||
"disable_mlock": true,
|
||||
"disable_performance_standby": false,
|
||||
"disable_printable_check": false,
|
||||
"disable_sealwrap": true,
|
||||
"raw_storage_endpoint": true,
|
||||
"disable_sentinel_trace": true,
|
||||
"enable_ui": true,
|
||||
"enable_response_header_hostname": false,
|
||||
"enable_response_header_raft_node_id": false,
|
||||
"ha_storage": map[string]interface{}{
|
||||
"cluster_addr": "top_level_cluster_addr",
|
||||
"disable_clustering": true,
|
||||
|
||||
Reference in New Issue
Block a user