generated from rdilweb/template-docusaurus-plugin
-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
Issue
My site pulls markdown files from multiple repos with some requiring Authorization. I'm adding Authorization headers to the
requestconfig that gets passed to Axios. I'm using cli-sync with noRuntimeDownloads: true.
The problem is that because this is added to the docusaurus.config.js it ends up in the compiled main.js.
requestConfig: {
timeout: 60000,
headers: {
"Accept": "application/vnd.github.raw+json",
"Authorization": `Bearer ${process.env.GITHUB_TOKEN}`, // The value of GITHUB_TOKEN is preset in complied JS
},
}Temporary Solution
The temporary solution I used was to reset the GITHUB_TOKEN to be empty after files are pulled but before build and deploy. I also stopped using the Docusaurus deploy and replaced it with the npm package gh-pages to deploy.
charlesanim, AronBuzogany and eric-gonzalez-tfsjonasfroeller and suppadeliux
Metadata
Metadata
Assignees
Labels
No labels