mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 06:39:48 +00:00
Skip invalid cookies and some tweaks
This commit is contained in:
parent
eef584528a
commit
4537582c78
@ -415,14 +415,18 @@ export function _actuallySend (renderedRequest, workspace, settings) {
|
||||
if (renderedRequest.settingStoreCookies && setCookieHeaders.length) {
|
||||
const jar = jarFromCookies(renderedRequest.cookieJar.cookies);
|
||||
for (const header of getSetCookieHeaders(headers)) {
|
||||
try {
|
||||
jar.setCookieSync(header.value, curl.getInfo(Curl.info.EFFECTIVE_URL));
|
||||
} catch (err) {
|
||||
timeline.push({name: 'TEXT', value: `Rejected cookie: ${err.message}`});
|
||||
}
|
||||
}
|
||||
|
||||
const cookies = await cookiesFromJar(jar);
|
||||
|
||||
// Make sure domains are prefixed with dots (Curl does this)
|
||||
for (const cookie of cookies) {
|
||||
if (cookie.domain[0] !== '.') {
|
||||
if (cookie.domain && cookie.domain[0] !== '.') {
|
||||
cookie.domain = `.${cookie.domain}`;
|
||||
}
|
||||
}
|
||||
|
@ -250,7 +250,7 @@ class RequestSwitcherModal extends PureComponent {
|
||||
<div className="pull-right faint italic">
|
||||
{requestGroup.name}
|
||||
|
||||
<i className="fa fa-folder-o"></i>
|
||||
<i className="fa fa-folder-o"/>
|
||||
</div>
|
||||
)}
|
||||
<MethodTag method={r.method}/>
|
||||
@ -260,10 +260,10 @@ class RequestSwitcherModal extends PureComponent {
|
||||
);
|
||||
})}
|
||||
|
||||
{matchedRequests.length && matchedWorkspaces.length && (
|
||||
<div className="pad-left pad-right">
|
||||
{(matchedRequests.length > 0 && matchedWorkspaces.length > 0) && (
|
||||
<li className="pad-left pad-right">
|
||||
<hr/>
|
||||
</div>
|
||||
</li>
|
||||
)}
|
||||
|
||||
{matchedWorkspaces.map((w, i) => {
|
||||
|
@ -79,6 +79,7 @@
|
||||
}
|
||||
|
||||
.modal__header {
|
||||
overflow: hidden;
|
||||
border-bottom: 1px solid @hl-md;
|
||||
height: @line-height-md;
|
||||
font-size: @font-size-lg;
|
||||
|
Loading…
Reference in New Issue
Block a user