Skip to content

Instantly share code, notes, and snippets.

@acgrid
Created January 17, 2026 15:25
Show Gist options
  • Select an option

  • Save acgrid/6a7f1148cb05ffd2ed0f4962a99cbc81 to your computer and use it in GitHub Desktop.

Select an option

Save acgrid/6a7f1148cb05ffd2ed0f4962a99cbc81 to your computer and use it in GitHub Desktop.
let id = 0
const domain = prompt('Enter domain')
const c = {} // key-valued cookies object
JSON.stringify(Object.keys(c).map(name => ({
domain,
hostOnly: true,
httpOnly: false,
name,
path: "/",
sameSite: "unspecified",
secure: true,
storeId: "0",
value: c[name],
id: id++
})))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment