UNPKG

834 BJavaScriptView Raw
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6
7exports.default = function (req, res) {
8 var host = req.get("host").replace(/buyer\.|shop\.|mall\.|platform\./, "");
9 if (/passport/.test(host)) {
10 res.clearCookie('_ecc_b2b_', { path: '/', domain: host, "maxAge": 0, httpOnly: true });
11 res.clearCookie('_ecc_b2b_platform', { path: '/', domain: host, "maxAge": 0, httpOnly: true });
12 } else {
13 res.clearCookie('_ecc_b2b_', { path: '/', domain: host, httpOnly: true });
14 res.clearCookie('_ecc_b2b_', { path: '/', domain: "www." + host, httpOnly: true });
15 res.clearCookie('_ecc_b2b_platform', { path: '/', domain: host, httpOnly: true });
16 }
17 res.send("clear cookie, ok");
18};
19
20module.exports = exports["default"];
21//# sourceMappingURL=logout.js.map
\No newline at end of file