diff --git a/Dockerfile b/Dockerfile index 6ca7a59bb..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); \ 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; 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 ( -