@ -81,8 +81,17 @@ const nextConfig = {
|
||||
(process.env.NEXT_PUBLIC_POSTHOG_HOST ??
|
||||
'https://app.posthog.com') + '/:path*',
|
||||
},
|
||||
{
|
||||
source: '/healthz',
|
||||
destination: '/api/health',
|
||||
},
|
||||
]
|
||||
: [
|
||||
{
|
||||
source: '/healthz',
|
||||
destination: '/api/health',
|
||||
},
|
||||
]
|
||||
: []
|
||||
},
|
||||
}
|
||||
|
||||
|
5
apps/builder/src/pages/api/health.ts
Normal file
5
apps/builder/src/pages/api/health.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import { NextApiRequest, NextApiResponse } from 'next'
|
||||
|
||||
export default function handler(req: NextApiRequest, res: NextApiResponse) {
|
||||
res.status(200).json({ status: 'ok', timestamp: new Date().toISOString() })
|
||||
}
|
@ -159,6 +159,10 @@ const nextConfig = {
|
||||
destination:
|
||||
'/api/v1/typebots/:typebotId/blocks/:blockId/storage/upload-url',
|
||||
},
|
||||
{
|
||||
source: '/healthz',
|
||||
destination: '/api/health',
|
||||
},
|
||||
])
|
||||
.concat(
|
||||
process.env.NEXTAUTH_URL
|
||||
|
5
apps/viewer/src/pages/api/health.ts
Normal file
5
apps/viewer/src/pages/api/health.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import { NextApiRequest, NextApiResponse } from 'next'
|
||||
|
||||
export default function handler(req: NextApiRequest, res: NextApiResponse) {
|
||||
res.status(200).json({ status: 'ok', timestamp: new Date().toISOString() })
|
||||
}
|
Reference in New Issue
Block a user