Skip to content

Commit

Permalink
ar(fix) bots shield
Browse files Browse the repository at this point in the history
  • Loading branch information
angeloreale committed Aug 27, 2024
1 parent 36f9049 commit 200021e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/app/api/v1/user/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ const generateErrorResponse = (e: any, status: number) => {
export async function POST(request: CombineRequest) {
const healthSecret =
request?.headers?.get('x-dp-keepalive') ||
request?.cookies?.toString().split('dp-health-check=')[1].split(';')[0] ||
request?.headers?.get('cookies').toString().split('dp-health-check=')[1].split(';')[0];
request?.cookies?.toString()?.split('dp-health-check=')[1].split(';')[0] ||
request?.headers?.get('cookies')?.toString()?.split('dp-health-check=')[1].split(';')[0] ||
'';
const isHealthCheck = healthSecret === process.env.NEXUS_KEEPALIVE;

if (isHealthCheck) {
Expand Down

0 comments on commit 200021e

Please sign in to comment.