about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--.envrc4
-rw-r--r--src/main.rs9
2 files changed, 12 insertions, 1 deletions
diff --git a/.envrc b/.envrc
index 4fafb8c..f5e765d 100644
--- a/.envrc
+++ b/.envrc
@@ -11,6 +11,8 @@ export BACKEND_URI="postgres://localhost?dbname=kittybox&host=/run/postgresql"
 export JOB_QUEUE_URI="postgres://localhost?dbname=kittybox&host=/run/postgresql"
 export BLOBSTORE_URI=file://./media-store
 export AUTH_STORE_URI=file://./auth-store
-export COOKIE_KEY="$(dd if=/dev/urandom bs=64 count=1 status=none | base64)"
+export COOKIE_KEY="$(dd if=/dev/urandom bs=128 count=1 status=none | base64 -w0)"
 # Add DATABASE_URL for `cargo test` invocations
 export DATABASE_URL="postgres://localhost?dbname=kittybox&host=/run/postgresql"
+# Don't verify TLS certificates (works only on debug builds, don't get any funny thoughts)
+export KITTYBOX_DANGER_INSECURE_TLS=1
diff --git a/src/main.rs b/src/main.rs
index f683c38..34c25c0 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -127,6 +127,15 @@ async fn main() {
             }
         }
 
+        // This only works on debug builds. Don't get any funny thoughts.
+        #[cfg(debug_assertions)]
+        if std::env::var("KITTYBOX_DANGER_INSECURE_TLS")
+            .map(|y| y == "1")
+            .unwrap_or(false)
+        {
+            builder = builder.danger_accept_invalid_certs(true);
+        }
+
         builder.build().unwrap()
     };