Skip to content

Commit

Permalink
fix: headers issues in sync (#2169)
Browse files Browse the repository at this point in the history
## Describe your changes

- User can pass some custom headers to proxy
- Node_env is not set by default
  • Loading branch information
bodinsamuel authored May 16, 2024
1 parent d2633fc commit a0649f5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/shared/lib/sdk/sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ export class NangoAction {
providerConfigKey: config.providerConfigKey,
connectionId: config.connectionId,
headers: {
...(config.headers || {}),
'user-agent': this.nango.userAgent
}
};
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/lib/environment/detection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const isStaging = process.env['NODE_ENV'] === NodeEnv.Staging;
export const isProd = process.env['NODE_ENV'] === NodeEnv.Prod;
export const isCloud = process.env['NANGO_CLOUD']?.toLowerCase() === 'true';
export const isEnterprise = process.env['NANGO_ENTERPRISE']?.toLowerCase() === 'true';
export const isLocal = !isCloud && !isEnterprise && !isDocker && process.env['NODE_ENV'] === NodeEnv.Dev;
export const isLocal = !isCloud && !isEnterprise && !isDocker && (process.env['NODE_ENV'] === NodeEnv.Dev || !process.env['NODE_ENV']);
export const isTest = Boolean(process.env['CI'] !== undefined || process.env['VITEST']);
export const isBasicAuthEnabled = !isCloud && process.env['NANGO_DASHBOARD_USERNAME'] && process.env['NANGO_DASHBOARD_PASSWORD'];
export const isHosted = !isCloud && !isLocal && !isEnterprise;
Expand Down

0 comments on commit a0649f5

Please # to comment.