π₯π₯π₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.
TypeScript boardsbug-trackerdjangodockerganttissue-trackerjirajira-alternativekanbanlinearpostgresqlproduct-managementproject-managementproject-planningpythonreactredistypesciptvitework-management
chore: Add env for handling uploads SSL Termination (#6722)
Akshat Jaind1e462bb37c0
diff --git a/.env.example b/.env.exampleindex 8b11217b5d..378a617278 100644--- a/.env.example+++ b/.env.example@@ -38,3 +38,6 @@ USE_MINIO=1# Nginx ConfigurationNGINX_PORT=80++# Force HTTPS for handling SSL Termination+MINIO_ENDPOINT_SSL=0diff --git a/apiserver/.env.example b/apiserver/.env.exampleindex 33ef5c4cdf..50a1c58a79 100644--- a/apiserver/.env.example+++ b/apiserver/.env.example@@ -59,4 +59,7 @@ APP_BASE_URL=# Hard delete files after days-HARD_DELETE_AFTER_DAYS=60\ No newline at end of file+HARD_DELETE_AFTER_DAYS=60++# Force HTTPS for handling SSL Termination+MINIO_ENDPOINT_SSL=0\ No newline at end of filediff --git a/apiserver/plane/settings/storage.py b/apiserver/plane/settings/storage.pyindex c843e9af49..a757d12f31 100644--- a/apiserver/plane/settings/storage.py+++ b/apiserver/plane/settings/storage.py@@ -32,6 +32,12 @@ class S3Storage(S3Boto3Storage):) or os.environ.get("MINIO_ENDPOINT_URL")if os.environ.get("USE_MINIO") == "1":++ # Determine protocol based on environment variable+ if os.environ.get("MINIO_ENDPOINT_SSL") == "1":+ endpoint_protocol = "https"+ else:+ endpoint_protocol = request.scheme if request else "http"# Create an S3 client for MinIOself.s3_client = boto3.client("s3",@@ -39,7 +45,7 @@ class S3Storage(S3Boto3Storage):aws_secret_access_key=self.aws_secret_access_key,region_name=self.aws_region,endpoint_url=(- f"{request.scheme}://{request.get_host()}"+ f"{endpoint_protocol}://{request.get_host()}"if requestelse self.aws_s3_endpoint_url),