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 ( return (
<StyledWrapper> <StyledWrapper>
<h1 className="font-medium mb-3">Proxy Settings</h1> <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}> <form className="bruno-form" onSubmit={formik.handleSubmit}>
<div className="mb-3 flex items-center"> <div className="mb-3 flex items-center">
<label className="settings-label" htmlFor="enabled"> <label className="settings-label" htmlFor="enabled">
@ -225,7 +232,7 @@ const ProxySettings = ({ proxyConfig, onUpdate }) => {
) : null} ) : null}
</div> </div>
</div> </div>
<div className="ml-4 mb-3 flex items-center"> <div className="mb-3 flex items-center">
<label className="settings-label" htmlFor="noProxy"> <label className="settings-label" htmlFor="noProxy">
Proxy Bypass Proxy Bypass
</label> </label>

View File

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