From 96d2f05eb740191f70949d388d120dd0595a54fa Mon Sep 17 00:00:00 2001 From: wsw <944627549@qq.com> Date: Thu, 25 May 2023 01:13:19 +0800 Subject: [PATCH 1/4] refactor: Fix undefined className in ListItem --- app/components/ui-lib.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/ui-lib.tsx b/app/components/ui-lib.tsx index 5687b1c5f..be9b30a68 100644 --- a/app/components/ui-lib.tsx +++ b/app/components/ui-lib.tsx @@ -42,7 +42,7 @@ export function ListItem(props: { className?: string; }) { return ( -
+
{props.icon &&
{props.icon}
}
From 75594b8fe561cb38690c33e956d0915239b0b1d3 Mon Sep 17 00:00:00 2001 From: lunaflora Date: Thu, 25 May 2023 11:31:45 +0800 Subject: [PATCH 2/4] *docker file bug --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6ca7a59bb..eac031644 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,7 +42,7 @@ EXPOSE 3000 CMD if [ -n "$PROXY_URL" ]; then \ if [ -z "$HOSTNAME" ]; then \ - export HOSTNAME="127.0.0.1" \ + export HOSTNAME="127.0.0.1"; \ fi; \ protocol=$(echo $PROXY_URL | cut -d: -f1); \ host=$(echo $PROXY_URL | cut -d/ -f3 | cut -d: -f1); \ From e33ad07e1684977ea0cca5642d3928aa9d7696f9 Mon Sep 17 00:00:00 2001 From: gtoxlili <664037691@qq.com> Date: Thu, 25 May 2023 11:46:31 +0800 Subject: [PATCH 3/4] fix: Logical corrections & syntax errors --- Dockerfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index eac031644..720a0cfe9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -41,9 +41,7 @@ COPY --from=builder /app/.next/server ./.next/server EXPOSE 3000 CMD if [ -n "$PROXY_URL" ]; then \ - if [ -z "$HOSTNAME" ]; then \ - export HOSTNAME="127.0.0.1"; \ - fi; \ + export HOSTNAME="127.0.0.1"; \ protocol=$(echo $PROXY_URL | cut -d: -f1); \ host=$(echo $PROXY_URL | cut -d/ -f3 | cut -d: -f1); \ port=$(echo $PROXY_URL | cut -d: -f3); \ From d5338956371707e9825da741cdcab83bdf6b5525 Mon Sep 17 00:00:00 2001 From: popcell Date: Thu, 25 May 2023 17:50:46 +0800 Subject: [PATCH 4/4] fix: #1746 Can't modify immutable headers. --- app/api/common.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/api/common.ts b/app/api/common.ts index b606d8ca2..03247539a 100644 --- a/app/api/common.ts +++ b/app/api/common.ts @@ -50,7 +50,13 @@ export async function requestOpenai(req: NextRequest) { if (res.status === 401) { // to prevent browser prompt for credentials - res.headers.delete("www-authenticate"); + const newHeaders = new Headers(res.headers); + newHeaders.delete("www-authenticate"); + return new Response(res.body, { + status: res.status, + statusText: res.statusText, + headers: newHeaders, + }); } return res;