server

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: Apache-2.0 Imports: 43 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FiberConfig added in v0.7.0

func FiberConfig(trustProxy ...bool) fiber.Config

FiberConfig is the HTTP server's configuration.

Immutable: without it, the strings fiber hands out (route parameters, cookies, form values) point into its request buffer, which is reused for the next request. etherpad-go keeps pad ids from requests beyond the request (the pad cache, pad locks, the memory datastore), so a pad id taken from one request turned into another request's pad id afterwards: an import into pad "d" made pad "s" disappear from the memory store, and a cached pad could be found under another pad's id.

trustProxy is the trustProxy setting (etherpad-lite: express "trust proxy"): behind a reverse proxy the client's address, the scheme (https) and the host come from its X-Forwarded-* headers. It used to be ignored, so every client had the proxy's address (rate limiting and logs) and cookies never got Secure.

func InitServer

func InitServer(setupLogger *zap.SugaredLogger, uiAssets embed.FS, pluginAssets embed.FS)

func PrepareServer

func PrepareServer(setupLogger *zap.SugaredLogger)

func RecoverMiddleware added in v0.7.0

func RecoverMiddleware(logger *zap.SugaredLogger) fiber.Handler

RecoverMiddleware is recoverMiddleware for tests that build their own app.

func StartUpdater added in v0.6.5

func StartUpdater(logger *zap.SugaredLogger, s *settings.Settings, currentVersion string, broadcast func(secsLeft int)) *updater.Updater

StartUpdater builds, starts and returns the self-update orchestrator. The broadcast callback (may be nil) is invoked with the seconds remaining at each drain announcement so connected clients can be warned of the restart.

Types

type RequiredTool

type RequiredTool struct {
	Name           string
	Description    string
	UrlForDownload string
}

Jump to

Keyboard shortcuts

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