diff options
-rw-r--r-- | packages/components/src/components/EditableText/EditableText.scss | 2 | ||||
-rw-r--r-- | src/server/server_Initialization.ts | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/packages/components/src/components/EditableText/EditableText.scss b/packages/components/src/components/EditableText/EditableText.scss index 691b05590..10f8328ae 100644 --- a/packages/components/src/components/EditableText/EditableText.scss +++ b/packages/components/src/components/EditableText/EditableText.scss @@ -23,7 +23,7 @@ .editableText-background { width: 100%; height: 100%; - z-index: -1px; + z-index: -1; position: absolute; transition: 0.4s; top: 0px; diff --git a/src/server/server_Initialization.ts b/src/server/server_Initialization.ts index 514e2ce1e..641a88312 100644 --- a/src/server/server_Initialization.ts +++ b/src/server/server_Initialization.ts @@ -125,10 +125,13 @@ function registerCorsProxy(server: express.Express) { //res.status(400).json({ error: 'Invalid URL format' }); return; } + + const isBinary = /\.(gif|png|jpe?g|bmp|webp|ico|pdf|zip|mp3|mp4|wav|ogg)$/i.test(targetUrl as string); + const responseType = isBinary ? 'arraybuffer' : 'text'; const response = await axios.get(targetUrl as string, { headers: { 'User-Agent': req.headers['user-agent'] || 'Mozilla/5.0' }, - responseType: 'text', + responseType: responseType }); const baseUrl = new URL(targetUrl as string); |