mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-24 22:06:38 +00:00
add strip duplicate sesion middleware
This commit is contained in:
@@ -3,6 +3,7 @@ import express from "express";
|
||||
import { parse } from "url";
|
||||
import logger from "@server/logger";
|
||||
import config from "@server/lib/config";
|
||||
import { stripDuplicateSesions } from "./middlewares/stripDuplicateSessions";
|
||||
|
||||
const nextPort = config.getRawConfig().server.next_port;
|
||||
|
||||
@@ -15,6 +16,8 @@ export async function createNextServer() {
|
||||
|
||||
const nextServer = express();
|
||||
|
||||
nextServer.use(stripDuplicateSesions);
|
||||
|
||||
nextServer.all("/{*splat}", (req, res) => {
|
||||
const parsedUrl = parse(req.url!, true);
|
||||
return handle(req, res, parsedUrl);
|
||||
|
||||
Reference in New Issue
Block a user