mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-17 16:15:22 +00:00
is broken
This commit is contained in:
@@ -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
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -501,7 +501,7 @@ async function lookupSiteOrSpaceInMultiIdMode(
|
||||
httpOnly: true,
|
||||
maxAge: 60 * 30,
|
||||
secure: process.env.NODE_ENV === 'production',
|
||||
sameSite: 'none',
|
||||
sameSite: undefined,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user