0

I wrote a test to subscribe to stripe on my site, it works fine in basic chrome, but when I add the --headless flag, I get a CORS error.

I tried this:

await stripe.confirmSetup({
        confirmParams: {return_url: `http://localhost:3000/plans`},
        elements,
})

When chromium is headless, redirect and confirmSetup doesn't work. What is the difference between a headless request and a normal browser request? Thanks.

I tried set pptr lunch flags:

'--disable-features=SameSiteByDefaultCookies,CookiesWithoutSameSiteMustBeSecure',
'--no-sandbox',
'--disable-setuid-sandbox',
'disable-web-security',
'--disable-features=IsolateOrigins,site-per-process'
fatihyildizhan
  • 8,614
  • 7
  • 64
  • 88
  • i think it not `stripe.confirmSetup` After i take Stripe Elements for my form i have a lot of console errors: `Failed to load resource: the server responded with a status of 400 ()` In headless mode. Normal mode "with head" works fine – Andrey Pakhomov Jan 13 '23 at 10:28

0 Answers0