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 ¶
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 ¶
var Panel = []string{ Announce, CacheControl, ContentDisposition, ContentEncoding, ContentSecurityPolicy, ContentType, ETag, MistgateClientAPI, PingResult, PingType, ProbeReport, ProfileTitle, ProfileUpdateInterval, ProfileWebPageURL, ReferrerPolicy, RetryAfter, Routing, SubscriptionPingOnopenEnabled, SubscriptionUserinfo, SupportURL, Vary, XContentTypeOptions, XFrameOptions, XHwidActive, XHwidLimit, XHwidMaxDevicesReached, XHwidNotSupported, XRobotsTag, }
Panel lists every constant above.
Functions ¶
func Reserved ¶
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.