Merge remote-tracking branch 'upstream/main' into feature/streamdown-and-fixes

This commit is contained in:
lyzno1
2025-09-16 10:23:50 +08:00
93 changed files with 10678 additions and 510 deletions

View File

@ -1,7 +1,7 @@
import { type NextRequest } from 'next/server'
import type { NextRequest } from 'next/server'
import { ChatClient } from 'dify-client'
import { v4 } from 'uuid'
import { API_KEY, API_URL, APP_ID } from '@/config'
import { API_KEY, API_URL, APP_ID, APP_INFO } from '@/config'
const userPrefix = `user_${APP_ID}:`
@ -15,6 +15,9 @@ export const getInfo = (request: NextRequest) => {
}
export const setSession = (sessionId: string) => {
if (APP_INFO.disable_session_same_site)
{ return { 'Set-Cookie': `session_id=${sessionId}; SameSite=None; Secure` } }
return { 'Set-Cookie': `session_id=${sessionId}` }
}