add cf headers for cms draft mode (#38822)
* add cf headers for cms draft mode * add env vars to turbo.json allowlist
This commit is contained in:
committed by
GitHub
parent
d70600c029
commit
5c9605e09c
@@ -6,10 +6,11 @@ import { generateReadingTime } from '~/lib/helpers'
|
||||
// Lightweight runtime for better performance
|
||||
export const runtime = 'edge'
|
||||
|
||||
// CORS headers for cross-origin requests
|
||||
const corsHeaders = {
|
||||
'Access-Control-Allow-Origin': '*',
|
||||
'Access-Control-Allow-Headers': 'authorization, x-client-info, apikey, content-type',
|
||||
'CF-Access-Client-Id': process.env.CF_ACCESS_CLIENT_ID ?? '',
|
||||
'CF-Access-Client-Secret': process.env.CF_ACCESS_CLIENT_SECRET ?? '',
|
||||
}
|
||||
|
||||
// Lightweight TOC generation for edge runtime
|
||||
|
||||
@@ -114,6 +114,8 @@
|
||||
"dependsOn": ["^build"],
|
||||
"env": [
|
||||
"ANALYZE",
|
||||
"CF_ACCESS_CLIENT_ID",
|
||||
"CF_ACCESS_CLIENT_SECRET",
|
||||
"CMS_API_KEY",
|
||||
"CMS_PREVIEW_SECRET",
|
||||
"CMS_SITE_ORIGIN",
|
||||
|
||||
Reference in New Issue
Block a user