add gists proxy url

This commit is contained in:
DefectingCat
2022-09-05 11:32:58 +08:00
parent e06078646b
commit 195cbd3b64
3 changed files with 5 additions and 6 deletions

View File

@ -2,10 +2,10 @@ import { Octokit } from 'octokit';
import { GistsFile } from 'types';
const password = process.env.NEXT_PUBLIC_GITHUB_API;
const host = process.env.NEXT_PUBLIC_GISTS_HOST ?? 'http://api.github.com';
const octokit = new Octokit({
auth: password,
// @TODO reverse proxy
baseUrl: 'http://api.github.com',
baseUrl: host,
});
const linkMatch = /<(.*?)>/;