Skip to content

Commit

Permalink
use hostname instead of origin to create cookie from automation cookie
Browse files Browse the repository at this point in the history
  • Loading branch information
cacieprins committed Dec 20, 2024
1 parent a8f0663 commit fb1219c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/server/lib/socket-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -382,9 +382,9 @@ export class SocketBase {
})

const setCrossOriginCookie = ({ cookie, url, sameSiteContext }: { cookie: SerializableAutomationCookie, url: string, sameSiteContext: SameSiteContext }) => {
const { origin } = new URL(url)
const { hostname } = new URL(url)

cookieJar.setCookie(automationCookieToToughCookie(cookie, origin), url, sameSiteContext)
cookieJar.setCookie(automationCookieToToughCookie(cookie, hostname), url, sameSiteContext)
}

socket.on('dev-server:on-spec-update', async (spec: Cypress.Spec) => {
Expand Down

0 comments on commit fb1219c

Please sign in to comment.