Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
越 贾
JYChatRoom1.0
Commits
420949cd
Commit
420949cd
authored
Aug 30, 2025
by
越 贾
Browse files
2025-08-29:ver3:设定固定位置避免消息过多时挤占聊天框,美观化前端样式(强AI辅助),检查删除了冗余API Routes
parent
4eab09ff
Changes
23
Hide whitespace changes
Inline
Side-by-side
chatroom/src/hooks/useAuth.ts
View file @
420949cd
// src/hooks/useAuth.ts
//
chatroom/
src/hooks/useAuth.ts
import
{
useState
,
useEffect
}
from
'
react
'
;
import
jwt
from
'
jsonwebtoken
'
;
...
...
chatroom/src/middleware.ts
deleted
100644 → 0
View file @
4eab09ff
//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
~$聊天室v2代码文本.docx
0 → 100644
View file @
420949cd
File added
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment