Skip to content

Commit

Permalink
frontend health route
Browse files Browse the repository at this point in the history
  • Loading branch information
sritanmotati committed Feb 5, 2025
1 parent 858d9a7 commit 8ef8196
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions frontend/pages/health.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { GetServerSideProps } from 'next';

const HealthPage = () => {
return <div>OK</div>;
};

export const getServerSideProps: GetServerSideProps = async ({ req }) => {
const userAgent = req.headers['user-agent'] || '';

if (userAgent !== 'service-status') {
return {
redirect: {
destination: '/',
permanent: false,
},
};
}

return {
props: {},
};
};

export default HealthPage;

0 comments on commit 8ef8196

Please sign in to comment.