fix: toggle self-signed certs support in oauth2 using env variable ACCEPT_INVALID_CERTS (#1694)

* toggle self-signed certs support in oauth2 using env variable DANGER_ACCEPT_INVALID_CERTS

* Update lib.rs

* Document DANGER_ACCEPT_INVALID_CERTS env variable

* change to ACCEPT_INVALID_CERTS

---------

Co-authored-by: Ruben Fiszel <ruben@rubenfiszel.com>
This commit is contained in:
Ming Fang
2023-06-09 15:14:43 +02:00
committed by GitHub
co-authored by Ruben Fiszel
parent ed07f8e6de
commit bfe88def34
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -362,6 +362,7 @@ it being synced automatically everyday.
| EXIT_AFTER_NO_JOB_FOR_SECS | None | Exit worker if no job is received after duration in secs if defined | Worker |
| OAUTH_JSON_AS_BASE64 | None | Base64 encoded JSON of the OAuth configuration. e.g `OAUTH_JSON_AS_BASE64=$(base64 oauth.json \| tr -d '\n')` to encode it | Server |
| REQUEST_SIZE_LIMIT | 2097152 (2MB) | Max request size which impact the maximum size of resources and payload size of job args | Server |
| ACCEPT_INVALID_CERTS | false | Accept invalid certificates, including self-signed and expired certificates | Server |
## Run a local dev setup
+1
View File
@@ -81,6 +81,7 @@ lazy_static::lazy_static! {
pub static ref HTTP_CLIENT: Client = reqwest::ClientBuilder::new()
.user_agent("windmill/beta")
.danger_accept_invalid_certs(std::env::var("ACCEPT_INVALID_CERTS").is_ok())
.build().unwrap();
pub static ref OAUTH_CLIENTS: AllClients = build_oauth_clients(&BASE_URL)