mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-22 18:43:29 +00:00
Accept a GITBOOK_TOKEN to fetch published content (#54)
This commit is contained in:
@@ -1,6 +1,16 @@
|
||||
# Configurations
|
||||
|
||||
### API ###
|
||||
|
||||
## API token to use when looking up the published content
|
||||
# GITBOOK_TOKEN=xxx
|
||||
|
||||
### URL of the application ###
|
||||
# NEXT_PUBLIC_GITBOOK_APP_URL=https://app.gitbook.com
|
||||
|
||||
### Image resizing ###
|
||||
# GITBOOK_IMAGE_RESIZE_SIGNING_KEY=1234567890
|
||||
# GITBOOK_IMAGE_RESIZE_URL=https://mycompany.com/cdn-cgi/image/
|
||||
|
||||
### SEO ###
|
||||
# GITBOOK_BLOCK_SEARCH_INDEXATION=true
|
||||
|
||||
@@ -47,6 +47,7 @@ export async function middleware(request: NextRequest) {
|
||||
const resolved = await withAPI(
|
||||
new GitBookAPI({
|
||||
endpoint: apiEndpoint,
|
||||
authToken: process.env.GITBOOK_TOKEN,
|
||||
}),
|
||||
() => lookupSpaceForURL(mode, inputURL, visitorAuthToken),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user