Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upHave S3 DOMAIN env setting so that Amazon URLs are not exposed #1128
Comments
|
It doesn't exist right now, but we might get that in the next version when you want to spend some time on it. The main part to modify is here: codimd/lib/web/imageRouter/s3.js Lines 44 to 48 in 3dc4011 And adding the option to the config library. PRs are welcome |
|
Great, thank you! I will put it on my backlog to work on :) Thanks for the very direct pointer to the code! |
I have Amazon S3 uploads setup in CodiMD and it all works great.
I have a bucket named
images.example.com, and I even have DNS setup so thatimages.example.comis a CNAME for my Amazon bucket.As far as I can tell, there is no S3_DOMAIN environment setting, so all the image URLs look like
https://s3-ca-central-1.amazonaws.com/images.example.builders/uploads/upload_d0e2a4d44acf975c9b748ce7d47f5a94.png(which is REGION/BUCKET)
The feature I am suggesting would introduce a new S3_DOMAIN env variable, where I could set
images.example.com(ideally with / without https) and then the image URLs would beimages.example.com/uploads/upload_d0e2a4d44acf975c9b748ce7d47f5a94.png.If this feature DOES exist already, help in understanding how to set it would be appreciated :)