diff options
author | Samuel <34555296+Flam3rboy@users.noreply.github.com> | 2021-10-18 11:02:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-18 11:02:08 +0200 |
commit | 508fbce94e652c743f38fde320587377b1fd2949 (patch) | |
tree | aca491cbbe4a6897f470fa1b228c3d73f89f0986 /api/src/routes | |
parent | Merge pull request #477 from DiegoMagdaleno/master (diff) | |
download | server-508fbce94e652c743f38fde320587377b1fd2949.tar.xz |
fix default cdn endpoint for message attachments
Diffstat (limited to 'api/src/routes')
-rw-r--r-- | api/src/routes/channels/#channel_id/messages/index.ts | 2 |
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; |