make code runnable

This commit is contained in:
Mirko Golze 2023-10-10 07:49:22 +02:00
parent 99fe4432c4
commit d64f4d3740
2 changed files with 11 additions and 4 deletions

View File

@ -53,6 +53,13 @@ const ProxySettings = ({ proxyConfig, onUpdate }) => {
return (
<StyledWrapper>
<h1 className="font-medium mb-3">Proxy Settings</h1>
<label className="settings-label">
<ul className="mb-3">
<li>To use the global proxy configuration, choose 'use global setting'</li>
<li>To use collection level configuration, choose 'enabled'</li>
<li>To disable the proxy for this collection, choose 'disabled'</li>
</ul>
</label>
<form className="bruno-form" onSubmit={formik.handleSubmit}>
<div className="mb-3 flex items-center">
<label className="settings-label" htmlFor="enabled">
@ -225,7 +232,7 @@ const ProxySettings = ({ proxyConfig, onUpdate }) => {
) : null}
</div>
</div>
<div className="ml-4 mb-3 flex items-center">
<div className="mb-3 flex items-center">
<label className="settings-label" htmlFor="noProxy">
Proxy Bypass
</label>

View File

@ -15,7 +15,7 @@ const { uuid } = require('../../utils/common');
const interpolateVars = require('./interpolate-vars');
const { interpolateString } = require('./interpolate-string');
const { sortFolder, getAllRequestsInFolderRecursively } = require('./helper');
const { preferences } = require('../../store/preferences');
const preferences = require('../../store/preferences');
const { getProcessEnvVars } = require('../../store/process-env');
const { getBrunoConfig } = require('../../store/bruno-config');
const { HttpsProxyAgent } = require('https-proxy-agent');
@ -220,8 +220,8 @@ const registerNetworkIpc = (mainWindow) => {
// proxy configuration
const brunoConfig = getBrunoConfig(collectionUid);
const proxyEnabled = get(brunoConfig, 'proxy.enabled', false);
if (proxyEnabled) {
const proxyEnabled = get(brunoConfig, 'proxy.enabled', 'disabled');
if (proxyEnabled === 'enabled') {
let proxyUri;
const interpolationOptions = {