Commit 420949cd authored by 越 贾's avatar 越 贾
Browse files

2025-08-29:ver3:设定固定位置避免消息过多时挤占聊天框,美观化前端样式(强AI辅助),检查删除了冗余API Routes

parent 4eab09ff
// src/hooks/useAuth.ts
// chatroom/src/hooks/useAuth.ts
import { useState, useEffect } from 'react';
import jwt from 'jsonwebtoken';
......
//src/middleware.ts
import { NextResponse } from 'next/server';
import type { NextRequest } from 'next/server';
// middleware.ts - 简化版本,因为jwt需要在API路由内部验证
export function middleware(req: NextRequest) {
// 中间件不验证JWT(因为Edge Runtime不支持jsonwebtoken包)
// JWT验证移到各个API路由内部处理
return NextResponse.next();
}
export const config = {
matcher: '/api/:path*'
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment