jointakahe / takahe

An ActivityPub/Fediverse server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow non-HTTPS connection to S3 storage

opened this issue · comments

At present, the protocol used to connect to an S3 media backend is hardcoded to HTTPS:

AWS_S3_ENDPOINT_URL = f"https://{parsed.hostname}:{port}"

I have deployed Takahe in k8s, with S3 storage provided by rook-ceph, so network traffic between Takahe and the S3 backend is over a private network. This is a legitimate use case for HTTP, but it is not currently possible to specify this in the Takahe settings.

Hmm, that is an interesting use case. I don't think normal S3 allows non-HTTPS access for most things, so it's probably safe to allow a protocol to be specified?

If there are no objections, shall I submit a PR?

Yes, go for it - I would suggest adding an option for s3-insecure:// as a protocol that Takahē understands for the media URL and then doing the setup based on that.

Implemented in #658.