mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Merge pull request #311 from Infisical/debug-new-integrations
Patch encoding header issue for some integrations for getting their apps
This commit is contained in:
@@ -262,7 +262,9 @@ const getAppsRender = async ({
|
|||||||
const res = (
|
const res = (
|
||||||
await axios.get(`${INTEGRATION_RENDER_API_URL}/v1/services`, {
|
await axios.get(`${INTEGRATION_RENDER_API_URL}/v1/services`, {
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: `Bearer ${accessToken}`
|
Authorization: `Bearer ${accessToken}`,
|
||||||
|
Accept: 'application/json',
|
||||||
|
'Accept-Encoding': 'application/json'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
).data;
|
).data;
|
||||||
@@ -272,6 +274,7 @@ const getAppsRender = async ({
|
|||||||
name: a.service.name,
|
name: a.service.name,
|
||||||
appId: a.service.id
|
appId: a.service.id
|
||||||
}));
|
}));
|
||||||
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
Sentry.setUser(null);
|
Sentry.setUser(null);
|
||||||
Sentry.captureException(err);
|
Sentry.captureException(err);
|
||||||
@@ -311,7 +314,9 @@ const getAppsFlyio = async ({
|
|||||||
url: INTEGRATION_FLYIO_API_URL,
|
url: INTEGRATION_FLYIO_API_URL,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
headers: {
|
headers: {
|
||||||
'Authorization': 'Bearer ' + accessToken
|
'Authorization': 'Bearer ' + accessToken,
|
||||||
|
'Accept': 'application/json',
|
||||||
|
'Accept-Encoding': 'application/json'
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
query,
|
query,
|
||||||
|
|||||||
@@ -322,7 +322,8 @@ const exchangeCodeGithub = async ({ code }: { code: string }) => {
|
|||||||
redirect_uri: `${SITE_URL}/integrations/github/oauth2/callback`
|
redirect_uri: `${SITE_URL}/integrations/github/oauth2/callback`
|
||||||
},
|
},
|
||||||
headers: {
|
headers: {
|
||||||
Accept: 'application/json'
|
'Accept': 'application/json',
|
||||||
|
'Accept-Encoding': 'application/json'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
).data;
|
).data;
|
||||||
|
|||||||
@@ -253,7 +253,7 @@ export default function Integrations() {
|
|||||||
const integrationOptionPress = async (integrationOption: IntegrationOption) => {
|
const integrationOptionPress = async (integrationOption: IntegrationOption) => {
|
||||||
try {
|
try {
|
||||||
const integrationAuthX = integrationAuths.find((integrationAuth) => integrationAuth.integration === integrationOption.slug);
|
const integrationAuthX = integrationAuths.find((integrationAuth) => integrationAuth.integration === integrationOption.slug);
|
||||||
|
|
||||||
if (!bot.isActive) {
|
if (!bot.isActive) {
|
||||||
await handleBotActivate();
|
await handleBotActivate();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import AuthorizeIntegration from "../../../api/integrations/authorizeIntegration
|
|||||||
|
|
||||||
export default function GitHubOAuth2CallbackPage() {
|
export default function GitHubOAuth2CallbackPage() {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
const { code, state } = queryString.parse(router.asPath.split('?')[1]);
|
const { code, state } = queryString.parse(router.asPath.split('?')[1]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user