Skip to content

Commit f8d9fc7

Browse files
committed
Unconfigured API state, health URL from server-side env, run container as nextjs user
1 parent a7b01f1 commit f8d9fc7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/app/page.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const STATS = [
4444
export const dynamic = 'force-dynamic';
4545

4646
export default function Home() {
47-
const apiUrl = process.env.DEVFLOW_API_URL ?? '';
47+
const apiUrl = (process.env.DEVFLOW_API_URL ?? '').replace(/\/+$/, '');
4848

4949
return (
5050
<div className='min-h-screen bg-slate-50 text-slate-900'>
@@ -71,7 +71,7 @@ export default function Home() {
7171
</a>
7272
<a
7373
className='rounded-lg border border-slate-300 bg-white px-4 py-2 text-sm font-medium text-slate-700 hover:bg-slate-100'
74-
href='https://devflow-api-jtmi.onrender.com/health/ready/'
74+
href={apiUrl ? `${apiUrl}/health/ready/` : '#'}
7575
>
7676
Open the API
7777
</a>

0 commit comments

Comments
 (0)