Spaces:
Running
Running
Upload server.js
Browse files
server.js
CHANGED
|
@@ -443,8 +443,8 @@ app.all('/r', async (req, res) => {
|
|
| 443 |
signal: controller.signal
|
| 444 |
})
|
| 445 |
|
| 446 |
-
const isJson = (upstream.headers.get('content-type') || '').includes('application/json');
|
| 447 |
-
const isM3u8 = (upstream.headers.get('content-type') || '').includes('mpegurl') || source.includes('.m3u8');
|
| 448 |
|
| 449 |
if (isJson) {
|
| 450 |
const buffer = await upstream.arrayBuffer();
|
|
|
|
| 443 |
signal: controller.signal
|
| 444 |
})
|
| 445 |
|
| 446 |
+
const isJson = (upstream.headers.get('content-type') || '').toLowerCase().includes('application/json');
|
| 447 |
+
const isM3u8 = (upstream.headers.get('content-type') || '').toLowerCase().includes('mpegurl') || source.toLowerCase().includes('.m3u8');
|
| 448 |
|
| 449 |
if (isJson) {
|
| 450 |
const buffer = await upstream.arrayBuffer();
|