desktopserver

package
v0.6.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package desktopserver serves the Electron renderer and product API from one authenticated loopback origin.

Index

Constants

View Source
const CookieName = "coding_desktop_session"

CookieName is the HttpOnly cookie Electron installs before loading the app.

Variables

This section is empty.

Functions

func New

func New(api http.Handler, assets fs.FS, token string) http.Handler

New returns a handler that protects both the renderer assets and API with a per-launch token. Keeping them on one origin preserves relative fetch and EventSource URLs without exposing a fixed unauthenticated localhost API.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL