mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-08 21:44:59 +08:00
fix: change matching pattern
This commit is contained in:
@@ -12,7 +12,7 @@ async function handle(
|
||||
}
|
||||
const [action, ...key] = params.key;
|
||||
// only allow to request to *.upstash.io
|
||||
if (!endpoint || !endpoint.endsWith("upstash.io")) {
|
||||
if (!endpoint || !new URL(endpoint).hostname.endsWith(".upstash.io")) {
|
||||
return NextResponse.json(
|
||||
{
|
||||
error: true,
|
||||
|
Reference in New Issue
Block a user