Skip to content

Commit 4dfd2f6

Browse files
committed
fix: update URL construction in detail.ejs to use relative paths
1 parent eecf3f1 commit 4dfd2f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/client/views/pages/detail.ejs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -545,8 +545,8 @@
545545
// Update URLs
546546
const updateUrls = (filename, isImage = false) => {
547547
const baseUrl = window.location.origin;
548-
const fileUrl = `${baseUrl}/api/file/preview/${encodeURIComponent(filename)}`;
549-
const imageUrl = `${baseUrl}/api/image/${encodeURIComponent(filename)}`;
548+
const fileUrl = `/api/file/preview/${encodeURIComponent(filename)}`;
549+
const imageUrl = `/api/image/${encodeURIComponent(filename)}`;
550550
551551
document.getElementById('direct-url').value = fileUrl;
552552

0 commit comments

Comments
 (0)