Spaces:
Paused
Paused
Update index.js
Browse files
index.js
CHANGED
|
@@ -148,12 +148,12 @@ app.get("/api/direct", async (req, res) => {
|
|
| 148 |
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36",
|
| 149 |
}
|
| 150 |
});
|
| 151 |
-
|
| 152 |
const finalUrl = response.headers.get("location");
|
| 153 |
if (!finalUrl) {
|
| 154 |
return res.status(500).json({ status: false, error: "Final URL not found" });
|
| 155 |
}
|
| 156 |
-
|
| 157 |
res.json({
|
| 158 |
status: true,
|
| 159 |
intermediate,
|
|
|
|
| 148 |
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36",
|
| 149 |
}
|
| 150 |
});
|
| 151 |
+
console.log(response.headers)
|
| 152 |
const finalUrl = response.headers.get("location");
|
| 153 |
if (!finalUrl) {
|
| 154 |
return res.status(500).json({ status: false, error: "Final URL not found" });
|
| 155 |
}
|
| 156 |
+
|
| 157 |
res.json({
|
| 158 |
status: true,
|
| 159 |
intermediate,
|