fix(self-hosted): GraphiQL invalided authentication credentials (#29972)

This commit is contained in:
Alaister Young
2024-10-18 16:18:18 +08:00
committed by GitHub
parent 061dce4d8c
commit 5bfad6bf1c

View File

@@ -71,7 +71,9 @@ const GraphiQLPage: NextPageWithLayout = () => {
...opts,
headers: {
...opts?.headers,
Authorization: `Bearer ${accessToken}`,
...(accessToken && {
Authorization: `Bearer ${accessToken}`,
}),
'x-graphql-authorization':
opts?.headers?.['Authorization'] ??
opts?.headers?.['authorization'] ??