mirror of
https://github.com/Expand-sys/ccashfrontend
synced 2025-12-18 15:42:14 +11:00
fixed logout
This commit is contained in:
parent
064a886775
commit
8b3e3da71c
1 changed files with 5 additions and 3 deletions
8
index.js
8
index.js
|
|
@ -26,12 +26,14 @@ fastify.register(require("fastify-secure-session"), {
|
||||||
cookieName: "session",
|
cookieName: "session",
|
||||||
// adapt this to point to the directory where secret-key is located
|
// adapt this to point to the directory where secret-key is located
|
||||||
key: fs.readFileSync(path.join(__dirname, "secret-key")),
|
key: fs.readFileSync(path.join(__dirname, "secret-key")),
|
||||||
cookie: {
|
Cookie: {
|
||||||
path: "/",
|
path: "/",
|
||||||
// options for setCookie, see https://github.com/fastify/fastify-cookie
|
// options for setCookie, see https://github.com/fastify/fastify-cookie
|
||||||
secure: `${process.env.SECURE}`,
|
signed: true,
|
||||||
|
secure: "auto",
|
||||||
httpOnly: true,
|
httpOnly: true,
|
||||||
overwrite: true,
|
overwrite: true,
|
||||||
|
sameSite: "none",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
fastify.register(fastifyFlash);
|
fastify.register(fastifyFlash);
|
||||||
|
|
@ -355,7 +357,7 @@ fastify.register(require("./routes/admin"), { prefix: "/admin" });
|
||||||
fastify.register(require("./routes/settings"), { prefix: "/settings" });
|
fastify.register(require("./routes/settings"), { prefix: "/settings" });
|
||||||
|
|
||||||
fastify.get("/logout", async function (req, res) {
|
fastify.get("/logout", async function (req, res) {
|
||||||
let checkalive = await got(`${api}../properties`, {
|
let checkalive = await got(`${api}/api/properties`, {
|
||||||
headers: {
|
headers: {
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue