mirror of
https://github.com/chirpstack/chirpstack.git
synced 2025-04-19 16:40:53 +00:00
Add option to pass auth. header to join-server.
This commit is contained in:
parent
75e9106bbb
commit
6d084b3b21
@ -29,6 +29,11 @@ pub async fn setup() -> Result<()> {
|
||||
tls_key: js.tls_key.clone(),
|
||||
async_timeout: js.async_timeout,
|
||||
request_log_sender: stream::backend_interfaces::get_log_sender().await,
|
||||
authorization: if js.authorization_header.is_empty() {
|
||||
None
|
||||
} else {
|
||||
Some(js.authorization_header.clone())
|
||||
},
|
||||
..Default::default()
|
||||
})?;
|
||||
|
||||
|
@ -797,6 +797,11 @@ pub fn run() {
|
||||
# #
|
||||
# # Set this to enable client-certificate authentication with the join-server.
|
||||
# tls_key="/path/to/tls_key.pem"
|
||||
|
||||
# # Authorization header.
|
||||
# #
|
||||
# # Optional value of the Authorization header, e.g. token or password.
|
||||
# authorization_header="Bearer sometoken"
|
||||
{{#each join_server.servers}}
|
||||
|
||||
[[join_server.servers]]
|
||||
@ -807,6 +812,7 @@ pub fn run() {
|
||||
ca_cert="{{ this.ca_cert }}"
|
||||
tls_cert="{{ this.tls_cert }}"
|
||||
tls_key="{{ this.tls_key }}"
|
||||
authorization_header="{{ this.authorization_header }}"
|
||||
{{/each}}
|
||||
|
||||
|
||||
|
@ -524,6 +524,7 @@ pub struct JoinServerServer {
|
||||
pub ca_cert: String,
|
||||
pub tls_cert: String,
|
||||
pub tls_key: String,
|
||||
pub authorization_header: String,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Default, Clone)]
|
||||
|
Loading…
x
Reference in New Issue
Block a user