Skip to content

Commit a0169ac

Browse files
committed
fix(proxy): do not lock users out of Compass when using authenticated proxies COMPASS-8382
1 parent fdde5ad commit a0169ac

File tree

2 files changed

+8
-13
lines changed

2 files changed

+8
-13
lines changed

packages/compass-settings/src/components/settings/proxy-settings-custom.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import {
2+
Banner,
23
Description,
34
FormFieldContainer,
45
Label,
@@ -197,6 +198,12 @@ export const ProxySettingsCustom: React.FunctionComponent<
197198
disabled={disabled}
198199
/>
199200
</FormFieldContainer>
201+
{(proxyPassword || proxyUsername) && (
202+
<Banner variant="warning">
203+
Some resources, such as map data for geographic visualizations, cannot
204+
currently be loaded through proxies which require authentication.
205+
</Banner>
206+
)}
200207
</div>
201208
);
202209
};

packages/compass/src/main/application.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -323,19 +323,7 @@ class CompassApplication {
323323
error: headline,
324324
}
325325
);
326-
327-
const sep = path.sep;
328-
const configPath = `${app.getPath(
329-
'userData'
330-
)}${sep}AppPreferences${sep}General.json`;
331-
332-
dialog.showErrorBox(
333-
'Unsupported proxy configuration',
334-
`${headline}\n\n
335-
To reset the proxy configuration, remove the "proxy" key in ${configPath} and restart Compass.`
336-
);
337-
338-
app.quit();
326+
await target.setProxy({});
339327
}
340328

341329
const agent = createAgent(proxyOptions);

0 commit comments

Comments
 (0)