Fix GitHub template authentication issue

- Add fallback support for VITE_GITHUB_ACCESS_TOKEN environment variable
- Fix 403 Forbidden error when fetching GitHub templates
- Improve authentication compatibility for different token naming conventions
- Ensure all GitHub-based templates work properly
This commit is contained in:
Stijnus
2025-08-30 12:05:17 +02:00
parent a90ebbf1da
commit f65a6889a1

View File

@@ -211,7 +211,8 @@ export async function loader({ request, context }: { request: Request; context:
try {
// Access environment variables from Cloudflare context or process.env
const githubToken = context?.cloudflare?.env?.GITHUB_TOKEN || process.env.GITHUB_TOKEN;
const githubToken =
context?.cloudflare?.env?.GITHUB_TOKEN || process.env.GITHUB_TOKEN || process.env.VITE_GITHUB_ACCESS_TOKEN;
let fileList;