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
bac5d6b8
Commit
bac5d6b8
authored
Aug 24, 2025
by
越 贾
Browse files
2025-08-23: first version which meets basic requirements of backend
parent
5a962098
Changes
42
Hide whitespace changes
Inline
Side-by-side
chatroom/src/middleware.ts
0 → 100644
View file @
bac5d6b8
//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
chatroom/tsconfig.json
0 → 100644
View file @
bac5d6b8
{
"compilerOptions"
:
{
"target"
:
"ES2017"
,
"lib"
:
[
"dom"
,
"dom.iterable"
,
"esnext"
],
"allowJs"
:
true
,
"skipLibCheck"
:
true
,
"strict"
:
true
,
"noEmit"
:
true
,
"esModuleInterop"
:
true
,
"module"
:
"esnext"
,
"moduleResolution"
:
"bundler"
,
"resolveJsonModule"
:
true
,
"isolatedModules"
:
true
,
"jsx"
:
"preserve"
,
"jsxImportSource"
:
"react"
,
//
必须新增这行
"incremental"
:
true
,
"baseUrl"
:
"."
,
"paths"
:
{
"@/*"
:
[
"./src/*"
]
},
"types"
:
[
"react"
,
"react-dom"
,
"next"
],
//
确保这行存在
"forceConsistentCasingInFileNames"
:
true
,
"plugins"
:
[
{
"name"
:
"next"
}
]
},
"include"
:
[
"next-env.d.ts"
,
"**/*.ts"
,
"**/*.tsx"
,
".next/types/**/*.ts"
],
"exclude"
:
[
"node_modules"
]
}
Prev
1
2
3
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