Skip to content

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

Merged
jackkav merged 11 commits intodevelopfrom
pre-req-req-cleanup-2
Mar 21, 2024
Merged

feat(pre-req): enable manipulation of proxy and certificate through insomnia.request - INS-3379#7171
jackkav merged 11 commits intodevelopfrom
pre-req-req-cleanup-2

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
@ihexxa ihexxa force-pushed the pre-req-req-cleanup-2 branch from 96ad005 to 6b6adac Compare March 19, 2024 02:50
ihexxa added 11 commits March 21, 2024 12:22
…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 force-pushed the pre-req-req-cleanup-2 branch from 36d2e4a to 30571f5 Compare March 21, 2024 11:22
@jackkav jackkav merged commit fab636a into develop Mar 21, 2024
@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