fix(dsh-plugin-browserskill): send JSON content-type on overlay interrupt

The observation HTTP fence rejects POSTs without application/json, so the
Interrupt button always got 403.
This commit is contained in:
BB-fat
2026-08-18 09:36:15 +00:00
parent 8bae85127a
commit fea66ce404
2 changed files with 20 additions and 9 deletions
@@ -20,7 +20,7 @@ export interface EventSourceLike {
export interface ObservationClientDeps {
fetchFn: (
url: string,
init?: { method?: string; body?: string },
init?: { method?: string; body?: string; headers?: Record<string, string> },
) => Promise<{
ok: boolean;
json(): Promise<unknown>;
@@ -282,6 +282,7 @@ export class ObservationClientStore {
try {
const res = await this.deps.fetchFn(INTERRUPT_URL, {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify(sessionId === undefined ? {} : { sessionId }),
});
if (!res.ok) return false;