Stabilize feature absolute-headers.

This commit is contained in:
Catherine
2026-10-17 21:16:22 +00:00
parent 83476d0ad1
commit 1f1c767f33
2 changed files with 4 additions and 6 deletions
+3 -2
View File
@@ -45,11 +45,12 @@ func configureFeatures(ctx context.Context) (err error) {
for _, feature := range config.Features {
switch feature {
// Work-in-progress features:
case "preview", "expiration", "absolute-headers":
case "preview", "expiration":
// Permanently unstable features:
case "codeberg-pages-compat", "relaxed-idna":
// Stabilized features:
case "archive-site", "audit", "compress", "patch", "serve-h2c", "existence-cache":
case "archive-site", "audit", "compress", "patch", "serve-h2c", "existence-cache",
"absolute-headers":
logc.Printf(ctx, "feature %s has been stabilized", feature)
// Removed or renamed features:
case "h2c", "sentry-telemetry-buffer", "site-existence-cache", "domain-existence-cache":
+1 -4
View File
@@ -460,10 +460,7 @@ func getPage(w http.ResponseWriter, r *http.Request) error {
w.Header().Set("Content-Type", *entry.ContentType)
}
headersMatchURL := &url.URL{Path: entryPath}
if config.Feature("absolute-headers") {
headersMatchURL = (&url.URL{Host: r.Host}).ResolveReference(r.URL)
}
headersMatchURL := (&url.URL{Host: r.Host}).ResolveReference(r.URL)
customHeaders, err := ApplyHeaderRules(manifest, headersMatchURL)
if err != nil {
// This is an "internal server error" from an HTTP point of view, but also