# fix\(desktop\): keep host-only cookies host-only on import · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/commit/1deedb31c4ef359d7ea62584da31d772b4cd9998)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

Requested revision: 1deedb31c4ef359d7ea62584da31d772b4cd9998

Requested commit: 1deedb31c4ef359d7ea62584da31d772b4cd9998

Commit: 1deedb31c4ef359d7ea62584da31d772b4cd9998

Tree: e4e4b1b5a7fd88f5f8944bee61710a3ddb6f27ed

Author: Julius Marminge

Committer: Julius Marminge

## Message

```
fix(desktop): keep host-only cookies host-only on import

Every imported cookie passed `domain` to `session.cookies.set`. Electron reads
any `domain` as marking a domain cookie and normalizes it with a leading dot,
so every host-only row — Chromium stores those without one — came out scoped to
all subdomains of the host it had been confined to. It also rejects `__Host-`
cookies, which require `domain` to be absent.

`domain` is now carried only for rows Chromium marked as domain cookies, and
omitted from the write otherwise.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

```

## Parents

- [96a6de86c234b04831b8022c09d19f39c8db6a58](https://git.cafe/pingdotgg/t3code/commit/96a6de86c234b04831b8022c09d19f39c8db6a58?format=markdown)

[Source at this commit](https://git.cafe/pingdotgg/t3code/tree/1deedb31c4ef359d7ea62584da31d772b4cd9998?format=markdown)
