Skip to content

Commit

Permalink
Use env variable for boto3 ssl verify
Browse files Browse the repository at this point in the history
  • Loading branch information
thomashbrnrd committed Oct 20, 2023
1 parent 4c8acab commit ac3af88
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion backend/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,9 @@ def upload_image(content: bytes, image_key: str):
S3_URL_ENDPOINT = init_variable("S3_URL_ENDPOINT", "https://s3.gra.io.cloud.ovh.net/")
S3_BUCKET_NAME = "basegun-s3"
S3_PREFIX = os.path.join("uploaded-images/", os.environ["WORKSPACE"])
s3 = boto3.resource("s3", endpoint_url=S3_URL_ENDPOINT)
s3 = boto3.resource(
"s3", endpoint_url=S3_URL_ENDPOINT, verify=os.environ.get("VERIFY_SSL", True)
)
""" TODO : check if connection successful
try:
s3.meta.client.head_bucket(Bucket=S3_BUCKET_NAME)
Expand Down

0 comments on commit ac3af88

Please sign in to comment.