Add Next.js instrumentation hook and update HTTP agent options to disable keep-alive for Google OAuth
Build and Push Reader Image / docker (push) Successful in 2m21s
Build and Push Reader Image / docker (push) Successful in 2m21s
This commit is contained in:
@@ -3,6 +3,13 @@ const readerApiOrigin = (process.env.READER_API_ORIGIN || "http://localhost:8000
|
||||
|
||||
const nextConfig = {
|
||||
output: "standalone",
|
||||
// Tắt HTTP keep-alive để tránh stale connection tới Google OAuth.
|
||||
// Sau lần đăng nhập đầu, Node.js giữ TCP socket tới oauth2.googleapis.com trong pool.
|
||||
// NAT/firewall của Docker drop socket sau vài phút (silently). Khi login lần 2,
|
||||
// openid-client (bên trong NextAuth) reuse socket đã chết → request treo → OAUTH_CALLBACK_ERROR 3500ms.
|
||||
httpAgentOptions: {
|
||||
keepAlive: false,
|
||||
},
|
||||
typescript: {
|
||||
ignoreBuildErrors: true,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user