Skip to content

Instantly share code, notes, and snippets.

@scolton99
Created February 25, 2022 04:16
Show Gist options
  • Save scolton99/f1d7617a7cc704fab59b991800ffaf34 to your computer and use it in GitHub Desktop.
Save scolton99/f1d7617a7cc704fab59b991800ffaf34 to your computer and use it in GitHub Desktop.
Function to fix the set-cookie header for Cypress test project.
const cookieFixer = req => {
req.continue(res => {
// Add the desired SameSite and Secure flags to the end of the header setting the cookie
res.headers['set-cookie'][0] += '; SameSite=None; Secure';
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment