DeepSeek Harness Plugin: dsh-logout-button

Introduction

The login session for DeepSeek Harness Web is a year-long, HttpOnly signed cookie (dsh-auth-*). JavaScript on the page cannot remove it, and the host exposes no logout route. After finishing a session on a shared computer, the only way to sign out is to manually clear site data — which is exactly what dsh-logout-button is built to solve.

What It Is

dsh-logout-button is a “Sign Out” button plugin for DeepSeek Harness Web, maintained by ramwin (MIT license, v0.1.0). It fills the missing “logout” capability in DSH Web: the server deletes the auth cookie, the browser provides the entry point, and the next page load lands you back at the 401 gate.

Core Features

The plugin consists of two halves:

  • Server-side half: Adds a POST /__logout route. It reads all cookies carried by the current request, issues a deletion for each (Set-Cookie: name=; Max-Age=0; Path=/), and appends Clear-Site-Data: "cookies".
  • Browser-side half: Places a 28px icon button on the right side of the session page header, and adds a descriptive entry under “Settings → General.” Clicking it triggers a confirmation dialog → calls the host’s /__logout → reloads the entire page → returns you to the 401 gate.

It only clears cookies; it does not touch localStorage / IndexedDB. Drafts, theme preferences, and history should not be wiped by a single sign-out.

Installation & Activation

There are two ways to attach it to the web profile — pick one.

A. As a bundle (recommended for other machines / publishing)

Add the dependency and bundles entry to the profile’s package.json:

{
  "dependencies": { "dsh-logout-button": "link:/path/to/dsh-logout-button" },
  "dsh": { "profile": { "bundles": ["dsh-logout-button"] } }
}

B. Profile patch only (local setup, takes effect immediately after editing)

Add the dependency, then append the following to the end of ~/.dsh/profiles/web/cordis.patch.yml:

- insert:
    - id: logout-button
      name: 'dsh-logout-button'

Link it into the profile:

cd ~/.dsh/profiles/web
dsh plugin --profile web install

On this machine (patchReload: live), the host hot-reloads after editing cordis.patch.yml — no restart needed. On other machines (without live reload), restart the web service once:

sudo launchctl kickstart -k system/<your-dsh-launchd-label>

After refreshing the page, you’ll see a new “Sign Out” icon on the right side of the session header; and a new “Sign Out” entry under Settings → General.

Typical Usage

The endpoint is POST /__logout and requires the header x-dsh-logout: 1. When an Origin header is present, it must be same-origin with Host.

curl -i -X POST http://127.0.0.1:3082/__logout \
  -H 'x-dsh-logout: 1' \
  -H 'Cookie: dsh-auth-abc=1; other=2'

Example response:

HTTP/1.1 200
clear-site-data: "cookies"
set-cookie: dsh-auth-abc=; Path=/; Max-Age=0; Expires=Thu, 01 Jan 1970 00:00:00 GMT
set-cookie: other=; Path=/; Max-Age=0; Expires=Thu, 01 Jan 1970 00:00:00 GMT
{"ok":true,"cleared":["dsh-auth-abc","other"]}

Use Cases & Notes

Ideal for quickly signing out on a shared computer so the next visit returns to the 401 gate. The plugin runs with the current DSH process’s permissions; review the source code and license (MIT) before installing.

In Closing

dsh-logout-button completes DSH Web’s “sign out” capability by deleting cookies server-side, making it easy to one-click exit after a session on a shared machine. For more details, visit:

  • Directory page: https://www.skillhub.cn/plugins/ramwin/dsh-logout-button
  • GitHub: https://github.com/ramwin/dsh-logout-button
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye