mirror of
https://github.com/cypress-io/cypress.git
synced 2026-02-13 18:50:18 -06:00
11 lines
313 B
JavaScript
11 lines
313 B
JavaScript
module.exports = {
|
|
getCookieUrl: (cookie = {}) => {
|
|
const prefix = cookie.secure ? 'https://' : 'http://'
|
|
|
|
// https://github.com/cypress-io/cypress/issues/6375
|
|
const host = cookie.domain.startsWith('.') ? cookie.domain.slice(1) : cookie.domain
|
|
|
|
return prefix + host + (cookie.path || '')
|
|
},
|
|
}
|