is broken

This commit is contained in:
Zeno Kapitein
2024-11-28 15:13:29 +01:00
parent 150269a6ee
commit 259a8aa7ac
4 changed files with 7 additions and 3 deletions
+4
View File
@@ -91,6 +91,8 @@ const apiSyncStorage = new AsyncLocalStorage<GitBookAPI>();
export const DEFAULT_API_ENDPOINT = process.env.GITBOOK_API_URL ?? 'https://api.gitbook.com';
console.log("API endpoint", DEFAULT_API_ENDPOINT);
/**
* Create a new API client with a token.
*/
@@ -98,6 +100,8 @@ export function apiWithToken(apiToken: string): GitBookAPI {
const headersList = headers();
const apiEndpoint = headersList.get('x-gitbook-api') ?? DEFAULT_API_ENDPOINT;
console.log("API Endpoint", apiEndpoint);
const gitbook = new GitBookAPI({
authToken: apiToken,
endpoint: apiEndpoint,
+1 -1
View File
@@ -5,7 +5,7 @@ import { memoryCache } from './memory';
export const cacheBackends = [
// Cache local to the process
// (can't be globally purged or shared between processes)
memoryCache,
// memoryCache,
// Cache local to the datacenter
// It can't be purged globally but it's faster
cloudflareCache,
+1 -1
View File
@@ -54,8 +54,8 @@ export function getContentSecurityPolicy(scripts: SpaceIntegrationScript[], nonc
object-src 'none';
base-uri 'self' ${assetsDomain};
form-action 'self' ${assetsDomain};
frame-ancestors https:;
`;
// frame-ancestors https:;
const result = scripts
.map(({ contentSecurityPolicy }) => contentSecurityPolicy)
+1 -1
View File
@@ -501,7 +501,7 @@ async function lookupSiteOrSpaceInMultiIdMode(
httpOnly: true,
maxAge: 60 * 30,
secure: process.env.NODE_ENV === 'production',
sameSite: 'none',
sameSite: undefined,
},
},
};