File tree Expand file tree Collapse file tree 5 files changed +28
-6
lines changed
Expand file tree Collapse file tree 5 files changed +28
-6
lines changed Original file line number Diff line number Diff line change 1+ ## [100.0.2] - 2025-10-23
2+
3+ ### Fixed
4+
5+ - 修复 /api/search/resources 接口越权问题
6+
17## [100.0.1] - 2025-09-25
28
39### Fixed
Original file line number Diff line number Diff line change 1- 100.0.1
1+ 100.0.2
Original file line number Diff line number Diff line change 11/* eslint-disable no-console */
22
33import { NextRequest , NextResponse } from 'next/server' ;
4-
4+ import { getAuthInfoFromCookie } from '@/lib/auth' ;
55import { getAvailableApiSites } from '@/lib/config' ;
66
77export const runtime = 'nodejs' ;
88
99// OrionTV 兼容接口
1010export async function GET ( request : NextRequest ) {
11- console . log ( 'request' , request . url ) ;
11+ const authInfo = getAuthInfoFromCookie ( request ) ;
12+ if ( ! authInfo || ! authInfo . username ) {
13+ return NextResponse . json ( { error : 'Unauthorized' } , { status : 401 } ) ;
14+ }
1215 try {
13- const apiSites = await getAvailableApiSites ( ) ;
16+ const apiSites = await getAvailableApiSites ( authInfo . username ) ;
1417
1518 return NextResponse . json ( apiSites ) ;
1619 } catch ( error ) {
Original file line number Diff line number Diff line change @@ -10,6 +10,19 @@ export interface ChangelogEntry {
1010}
1111
1212export const changelog : ChangelogEntry [ ] = [
13+ {
14+ version : "100.0.2" ,
15+ date : "2025-10-23" ,
16+ added : [
17+ // 无新增内容
18+ ] ,
19+ changed : [
20+ // 无变更内容
21+ ] ,
22+ fixed : [
23+ "修复 /api/search/resources 接口越权问题"
24+ ]
25+ } ,
1326 {
1427 version : "100.0.1" ,
1528 date : "2025-09-25" ,
@@ -19,7 +32,7 @@ export const changelog: ChangelogEntry[] = [
1932 changed : [
2033 // 无变更内容
2134 ] ,
22- fixed : [
35+ fixed : [
2336 "修复错误的环境变量 ADMIN_USERNAME" ,
2437 "修复 bangumi 数据中没有图片导致首页崩溃问题"
2538 ]
Original file line number Diff line number Diff line change 11/* eslint-disable no-console */
22
3- const CURRENT_VERSION = '100.0.1 ' ;
3+ const CURRENT_VERSION = '100.0.2 ' ;
44
55// 导出当前版本号供其他地方使用
66export { CURRENT_VERSION } ;
You can’t perform that action at this time.
0 commit comments