mirror of
https://github.com/spacebarchat/server.git
synced 2026-10-22 17:32:30 +00:00
fix default cdn endpoint for message attachments
This commit is contained in:
1 parent
f6b08b84a1
commit
046692b294
1 file changed
+1
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user