cfoo
commited on
Commit
•
c2cfb9c
1
Parent(s):
d70114d
Update index.js
Browse files
index.js
CHANGED
@@ -26,7 +26,7 @@ app.all('/', async (req, res) => {
|
|
26 |
//cookies = cookies.map(cookie => cookie.replace('Path=/', ''));
|
27 |
// Join the cookies with semicolons
|
28 |
//cookies = cookies.join('; ');
|
29 |
-
cookies = cookies.map(cookie => cookie.split(';')[0]).join(';');
|
30 |
// Return the cookies as the body of the response
|
31 |
res.send(cookies); // 这里使用res.send方法,而不是res.json方法
|
32 |
} catch (error) {
|
|
|
26 |
//cookies = cookies.map(cookie => cookie.replace('Path=/', ''));
|
27 |
// Join the cookies with semicolons
|
28 |
//cookies = cookies.join('; ');
|
29 |
+
cookies = cookies.map(cookie => cookie.split(';')[0]).join('; ');
|
30 |
// Return the cookies as the body of the response
|
31 |
res.send(cookies); // 这里使用res.send方法,而不是res.json方法
|
32 |
} catch (error) {
|