fix: Pass github authorization via header instead of query string
This commit is contained in:
parent
394be7ba74
commit
71ed0844b9
@ -58,8 +58,12 @@ router.get('/developers', ctx => renderpage(ctx, <Developers />));
|
||||
router.get('/developers/api', ctx => renderpage(ctx, <Api />));
|
||||
router.get('/changelog', async ctx => {
|
||||
const data = await fetch(
|
||||
`https://api.github.com/repos/outline/outline/releases?access_token=${process
|
||||
.env.GITHUB_ACCESS_TOKEN || ''}`
|
||||
`https://api.github.com/repos/outline/outline/releases`,
|
||||
{
|
||||
headers: {
|
||||
Authorization: `token ${process.env.GITHUB_ACCESS_TOKEN || ''}`,
|
||||
},
|
||||
}
|
||||
);
|
||||
const releases = await data.json();
|
||||
return renderpage(ctx, <Changelog releases={releases} />);
|
||||
|
Reference in New Issue
Block a user