fix: Attachments on public share links broken when using AWS Accelerate

fix: Attachments broken when using non-collab and AWS bucket on the same host
(https://github.com/outline/outline/discussions/3274\)
This commit is contained in:
Tom Moor
2022-03-22 22:58:29 -07:00
parent e6eb43144c
commit 5047be9898
3 changed files with 8 additions and 2 deletions

View File

@@ -6,6 +6,7 @@ export default function present(env: Record<string, any>): PublicEnv {
return {
URL: env.URL.replace(/\/$/, ""),
AWS_S3_UPLOAD_BUCKET_URL: env.AWS_S3_UPLOAD_BUCKET_URL,
AWS_S3_ACCELERATE_URL: env.AWS_S3_ACCELERATE_URL,
CDN_URL: (env.CDN_URL || "").replace(/\/$/, ""),
COLLABORATION_URL: (env.COLLABORATION_URL || env.URL)
.replace(/\/$/, "")