mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-19 22:14:50 +00:00
fix(terminal): new function name of cookie package
This commit is contained in:
1 file changed
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
import { WebSocketServer } from 'ws';
|
import { WebSocketServer } from 'ws';
|
||||||
import http from 'http';
|
import http from 'http';
|
||||||
import pty from 'node-pty';
|
import pty from 'node-pty';
|
||||||
import cookie from 'cookie';
|
import { parseCookie } from 'cookie';
|
||||||
import 'dotenv/config';
|
import 'dotenv/config';
|
||||||
import {
|
import {
|
||||||
extractHereDocContent,
|
extractHereDocContent,
|
||||||
@@ -96,7 +96,7 @@ const server = http.createServer((req, res) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const getSessionCookie = (req) => {
|
const getSessionCookie = (req) => {
|
||||||
const cookies = cookie.parse(req.headers.cookie || '');
|
const cookies = parseCookie(req.headers.cookie || '');
|
||||||
const xsrfToken = cookies['XSRF-TOKEN'];
|
const xsrfToken = cookies['XSRF-TOKEN'];
|
||||||
const appName = process.env.APP_NAME || 'laravel';
|
const appName = process.env.APP_NAME || 'laravel';
|
||||||
const sessionCookieName = `${appName.replace(/[^a-zA-Z0-9]/g, '_').toLowerCase()}_session`;
|
const sessionCookieName = `${appName.replace(/[^a-zA-Z0-9]/g, '_').toLowerCase()}_session`;
|
||||||
|
|||||||
Reference in new issue
Block a user