@ -81,8 +81,17 @@ const nextConfig = {
|
|||||||
(process.env.NEXT_PUBLIC_POSTHOG_HOST ??
|
(process.env.NEXT_PUBLIC_POSTHOG_HOST ??
|
||||||
'https://app.posthog.com') + '/:path*',
|
'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:
|
destination:
|
||||||
'/api/v1/typebots/:typebotId/blocks/:blockId/storage/upload-url',
|
'/api/v1/typebots/:typebotId/blocks/:blockId/storage/upload-url',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
source: '/healthz',
|
||||||
|
destination: '/api/health',
|
||||||
|
},
|
||||||
])
|
])
|
||||||
.concat(
|
.concat(
|
||||||
process.env.NEXTAUTH_URL
|
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() })
|
||||||
|
}
|
@ -25,6 +25,14 @@ const nextConfig = {
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
async rewrites() {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
source: '/healthz',
|
||||||
|
destination: '/api/health',
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
export default nextConfig
|
export default nextConfig
|
||||||
|
5
ee/apps/landing-page/pages/api/health.ts
Normal file
5
ee/apps/landing-page/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