Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

Patch encoding header issue for some integrations for getting their apps

Tuan Dangaba8feb98507
diff --git a/backend/src/integrations/apps.ts b/backend/src/integrations/apps.ts
index 50f146be57..3d834d8768 100644
--- a/backend/src/integrations/apps.ts
+++ b/backend/src/integrations/apps.ts
@@ -262,7 +262,9 @@ const getAppsRender = async ({
const res = (
await axios.get(`${INTEGRATION_RENDER_API_URL}/v1/services`, {
headers: {
- Authorization: `Bearer ${accessToken}`
+ Authorization: `Bearer ${accessToken}`,
+ Accept: 'application/json',
+ 'Accept-Encoding': 'application/json'
}
})
).data;
@@ -272,6 +274,7 @@ const getAppsRender = async ({
name: a.service.name,
appId: a.service.id
}));
+
} catch (err) {
Sentry.setUser(null);
Sentry.captureException(err);
@@ -311,7 +314,9 @@ const getAppsFlyio = async ({
url: INTEGRATION_FLYIO_API_URL,
method: 'post',
headers: {
- 'Authorization': 'Bearer ' + accessToken
+ 'Authorization': 'Bearer ' + accessToken,
+ 'Accept': 'application/json',
+ 'Accept-Encoding': 'application/json'
},
data: {
query,
diff --git a/backend/src/integrations/exchange.ts b/backend/src/integrations/exchange.ts
index 846c9e7db9..8650b31a09 100644
--- a/backend/src/integrations/exchange.ts
+++ b/backend/src/integrations/exchange.ts
@@ -322,7 +322,8 @@ const exchangeCodeGithub = async ({ code }: { code: string }) => {
redirect_uri: `${SITE_URL}/integrations/github/oauth2/callback`
},
headers: {
- Accept: 'application/json'
+ 'Accept': 'application/json',
+ 'Accept-Encoding': 'application/json'
}
})
).data;
diff --git a/frontend/src/pages/integrations/[id].tsx b/frontend/src/pages/integrations/[id].tsx
index e6bc784f67..d802e81a8d 100644
--- a/frontend/src/pages/integrations/[id].tsx
+++ b/frontend/src/pages/integrations/[id].tsx
@@ -253,7 +253,7 @@ export default function Integrations() {
const integrationOptionPress = async (integrationOption: IntegrationOption) => {
try {
const integrationAuthX = integrationAuths.find((integrationAuth) => integrationAuth.integration === integrationOption.slug);
-
+
if (!bot.isActive) {
await handleBotActivate();
}
diff --git a/frontend/src/pages/integrations/github/oauth2/callback.tsx b/frontend/src/pages/integrations/github/oauth2/callback.tsx
index ab2bb18c8f..a3fd7e84c0 100644
--- a/frontend/src/pages/integrations/github/oauth2/callback.tsx
+++ b/frontend/src/pages/integrations/github/oauth2/callback.tsx
@@ -7,7 +7,6 @@ import AuthorizeIntegration from "../../../api/integrations/authorizeIntegration
export default function GitHubOAuth2CallbackPage() {
const router = useRouter();
-
const { code, state } = queryString.parse(router.asPath.split('?')[1]);
useEffect(() => {