Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(pre-req): enable manipulation of proxy and certificate through insomnia.request - INS-3379 #7171

Merged
merged 11 commits into from
Mar 21, 2024

Conversation

ihexxa
Copy link
Contributor

@ihexxa ihexxa commented Mar 13, 2024

Please review this PR (#7170) firstly as current one is based on it

This is change is not part of request manipulation PR because this basically manipulate values from settings and clientCertificates, and for making PRs small.

Changes:

  • enabled manipulation certificate and proxy through insomnia.request
  • added smoke tests
  • added UTs

How to test

Run this script and check if it runs well:

// print current proxy and modify it
console.log(insomnia.request.proxy.getProxyUrl());
insomnia.request.proxy.update({
        host: 'localhost',
        match: '<all_urls>',
        port: 8888,
        tunnel: false,
        authenticate: false,
        username: '',
        password: '',
});

// print current certificate and modify it
// print the original one
console.log('key:', insomnia.request.certificate.key.src);
console.log('cert:', insomnia.request.certificate.cert.src);
console.log('passphrass:', insomnia.request.certificate.passphrass);
console.log('pfx:', insomnia.request.certificate.pfx.src);
// update
insomnia.request.certificate.update({
    disabled: true,
    key: {src: 'invalid.key'},
    cert: {src: 'invalid.cert'},
    passphrase: '',
    pfx: {src: ''},
});

@ihexxa ihexxa self-assigned this Mar 13, 2024
@ihexxa ihexxa force-pushed the pre-req-req-cleanup-2 branch 4 times, most recently from ec8bbaa to bb10ea4 Compare March 15, 2024 14:12
@ihexxa ihexxa changed the title feat(pre-req): enable manipulation of proxy and certificate through insomnia.request feat(pre-req): enable manipulation of proxy, certificate and auth through insomnia.request - INS-3379 Mar 15, 2024
@ihexxa ihexxa changed the title feat(pre-req): enable manipulation of proxy, certificate and auth through insomnia.request - INS-3379 feat(pre-req): enable manipulation of proxy and certificate through insomnia.request - INS-3379 Mar 18, 2024
…request

Changes:
- chore: revert changes on test
- fix: allow user to update active request certs and proxy through insomnia.request
- feat: hook settings to insomnia.request and cleanups
- test: add a test for proxy and certificate manipulation
- fix: lint error
- fix: problems after rebasing
- fix: revamp auth transforming functions
- fix: type checking
- test: add a unit test for auth transforming
@jackkav jackkav merged commit fab636a into develop Mar 21, 2024
7 checks passed
@jackkav jackkav deleted the pre-req-req-cleanup-2 branch March 21, 2024 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants