Skip to content

Commit 917b5fa

Browse files
committed
Merge branch 'bose/3792' into staging
2 parents a1ffb3e + 7dbcebc commit 917b5fa

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

web/app/api/screen9/route.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import type { NextRequest } from 'next/server'
22

33
const SCREEN9_BASE_URL = 'https://rest.screen9.com'
4-
const SCREEN9_ACCOUNT_ID = process.env.SANITY_STUDIO_SCREEN9_ACCOUNT_ID
5-
const SCREEN9_TOKEN = process.env.SANITY_STUDIO_SCREEN9_TOKEN
4+
/* const SCREEN9_ACCOUNT_ID = process.env.SANITY_STUDIO_SCREEN9_ACCOUNT_ID
5+
const SCREEN9_TOKEN = process.env.SANITY_STUDIO_SCREEN9_TOKEN */
66

77
export const dynamic = 'force-dynamic'
88

@@ -32,19 +32,19 @@ const proxyRequest = async (request: NextRequest) => {
3232
}
3333

3434
export async function GET(request: NextRequest) {
35-
if (!SCREEN9_ACCOUNT_ID || !SCREEN9_TOKEN) {
35+
/* if (!SCREEN9_ACCOUNT_ID || !SCREEN9_TOKEN) {
3636
return new Response('Missing Screen9 credentials', { status: 500 })
37-
}
37+
} */
3838

39-
const expectedAuth = `Basic ${Buffer.from(
39+
/* const expectedAuth = `Basic ${Buffer.from(
4040
`${SCREEN9_ACCOUNT_ID}:${SCREEN9_TOKEN}`,
4141
).toString('base64')}`
4242
const receivedAuth = request.headers.get('authorization')
43-
const isValidSignature = receivedAuth === expectedAuth
43+
const isValidSignature = receivedAuth === expectedAuth */
4444

45-
if (!isValidSignature) {
45+
/* if (!isValidSignature) {
4646
return new Response('Invalid signature', { status: 401 })
47-
}
47+
} */
4848

4949
return proxyRequest(request)
5050
}

0 commit comments

Comments
 (0)