mirror of
https://github.com/DefectingCat/DefectingCat.github.io
synced 2025-07-15 16:51:37 +00:00
add gists proxy url
This commit is contained in:
@ -9,10 +9,10 @@ import { Octokit } from 'octokit';
|
||||
*/
|
||||
async function getGists(page, perPage) {
|
||||
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,
|
||||
});
|
||||
return await octokit.rest.gists.list({
|
||||
page,
|
||||
|
Reference in New Issue
Block a user