Spaces:
Running
Running
Update index.js
Browse files
index.js
CHANGED
@@ -97,7 +97,10 @@ app.get('/yt/convert', async (req, res) => {
|
|
97 |
|
98 |
const fetchPost = (url, body) => (fetch(url, {
|
99 |
method: 'POST', body,
|
100 |
-
headers: {
|
|
|
|
|
|
|
101 |
}))
|
102 |
|
103 |
const reqTaskId = await fetchPost('https://srvcdn3.2convert.me/api/json', `hash=${encodeURIComponent(hash)}`)
|
|
|
97 |
|
98 |
const fetchPost = (url, body) => (fetch(url, {
|
99 |
method: 'POST', body,
|
100 |
+
headers: {
|
101 |
+
'Content-Type': 'application/x-www-form-urlencoded',
|
102 |
+
'Referer': 'https://y2mate.is/'
|
103 |
+
}
|
104 |
}))
|
105 |
|
106 |
const reqTaskId = await fetchPost('https://srvcdn3.2convert.me/api/json', `hash=${encodeURIComponent(hash)}`)
|