File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import type { NextRequest } from 'next/server'
22
33const 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
77export const dynamic = 'force-dynamic'
88
@@ -32,19 +32,19 @@ const proxyRequest = async (request: NextRequest) => {
3232}
3333
3434export 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}
You can’t perform that action at this time.
0 commit comments