subhdr

package
v0.2.0-dev.4 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0 modules, 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

Overview

Package subhdr names the response headers of the subscription endpoint and says which names the owner's own response headers (SubscriptionSettings.response_headers) may not take.

The constants are what the code of internal/panel/subs sets, and that code names a header only through them: a test of that package reads its source and fails for a header it sets by a literal or by a name that is not in Panel. So the list of names the owner may not use is the list of what the panel sets, kept in one place, not a second list beside it. What is not the panel's own, the transport and security headers of every HTTP answer, is listed below it.

Index

Constants

View Source
const (
	Announce                      = "Announce"
	CacheControl                  = "Cache-Control"
	ContentDisposition            = "Content-Disposition"
	ContentEncoding               = "Content-Encoding"
	ContentSecurityPolicy         = "Content-Security-Policy"
	ContentType                   = "Content-Type"
	ETag                          = "ETag"
	MistgateClientAPI             = "Mistgate-Client-Api"
	PingResult                    = "Ping-Result"
	PingType                      = "Ping-Type"
	ProbeReport                   = "Probe-Report"
	ProfileTitle                  = "Profile-Title"
	ProfileUpdateInterval         = "Profile-Update-Interval"
	ProfileWebPageURL             = "Profile-Web-Page-Url"
	ReferrerPolicy                = "Referrer-Policy"
	RetryAfter                    = "Retry-After"
	Routing                       = "Routing"
	SubscriptionPingOnopenEnabled = "Subscription-Ping-Onopen-Enabled"
	SubscriptionUserinfo          = "Subscription-Userinfo"
	SupportURL                    = "Support-Url"
	Vary                          = "Vary"
	XContentTypeOptions           = "X-Content-Type-Options"
	XFrameOptions                 = "X-Frame-Options"
	XHwidActive                   = "X-Hwid-Active"
	XHwidLimit                    = "X-Hwid-Limit"
	XHwidMaxDevicesReached        = "X-Hwid-Max-Devices-Reached"
	XHwidNotSupported             = "X-Hwid-Not-Supported"
	XRobotsTag                    = "X-Robots-Tag"
)

The headers the subscription endpoint sets on its answers (app answers, the user page, the devices API, the client API and the refusals). Add a header the code sets here and to Panel; the tests fail until both are done.

Variables

Panel lists every constant above.

Functions

func Reserved

func Reserved(name string) bool

Reserved reports whether name (any case) is a header the owner may not set: one of the panel's own, a member of one of its families, or a transport header.

func ReservedNames

func ReservedNames() []string

ReservedNames is the same rule as a list for the admin: the prefixes written with a trailing "*" ("X-Hwid-*") and the exact names that no prefix covers, sorted.

Types

This section is empty.

Jump to

Keyboard shortcuts

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