server

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2026 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Overview

Package server renders the servers screen: host stats history, Docker daemon info, and the server-level default settings.

templ: version: v0.3.1001

templ: version: v0.3.1001

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CookieCovers

func CookieCovers(cookieDomain, envDomainBase string) bool

CookieCovers reports whether a browser holding the panel's session cookie would send it to a hostname under envDomainBase.

A cookie set for "panel.example.com" is never sent to "app.preview.com", and is only sent to "x.panel.example.com" because that is a subdomain. So the forwardAuth on preview URLs is useful exactly when the panel's domain is the base itself or a parent of it.

An unset base is "nothing to protect", which is not a misconfiguration. An unset cookie domain is: BASE_URL is empty, so the cookie is host-only for whatever hostname the panel was reached on and is never sent to a preview URL, the configuration where turning this on locks everyone out is exactly the one where the warning used to be hidden.

func NewHandler

func NewHandler(d Deps) *handler

NewHandler creates a new server handler.

Types

type Deps

type Deps struct {
	Store        repo.Store
	Runtime      *runtime.Runtime
	Proxy        *proxy.Proxy
	CookieDomain string
	Nodes        *nodes.Service
	Cluster      *cluster.Cluster
	Mover        *volmove.Service
	BaseURL      string
	DataDir      string
	Version      string
}

Deps is what the servers screens need. A struct rather than nine positional arguments, which is what it had grown to.

Jump to

Keyboard shortcuts

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