summary refs log tree commit diff
path: root/api/src
diff options
context:
space:
mode:
authorSamuel <34555296+Flam3rboy@users.noreply.github.com>2021-10-18 11:02:08 +0200
committerGitHub <noreply@github.com>2021-10-18 11:02:08 +0200
commit508fbce94e652c743f38fde320587377b1fd2949 (patch)
treeaca491cbbe4a6897f470fa1b228c3d73f89f0986 /api/src
parentMerge pull request #477 from DiegoMagdaleno/master (diff)
downloadserver-508fbce94e652c743f38fde320587377b1fd2949.tar.xz
fix default cdn endpoint for message attachments
Diffstat (limited to 'api/src')
-rw-r--r--api/src/routes/channels/#channel_id/messages/index.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/api/src/routes/channels/#channel_id/messages/index.ts b/api/src/routes/channels/#channel_id/messages/index.ts

index 296bec9a..a0834be0 100644 --- a/api/src/routes/channels/#channel_id/messages/index.ts +++ b/api/src/routes/channels/#channel_id/messages/index.ts
@@ -119,7 +119,7 @@ router.get("/", async (req: Request, res: Response) => { x.attachments?.forEach((x) => { // dynamically set attachment proxy_url in case the endpoint changed const uri = x.proxy_url.startsWith("http") ? x.proxy_url : `https://example.org${x.proxy_url}`; - x.proxy_url = `${endpoint == null ? "http://localhost:3003" : endpoint}${new URL(uri).pathname}`; + x.proxy_url = `${endpoint == null ? "" : endpoint}${new URL(uri).pathname}`; }); return x;