Improved the bootstrap script to write the canonical site origin and also, fixed some nasty bugs.
This commit is contained in:
@@ -56,10 +56,11 @@ extension String {
|
||||
}
|
||||
/// A namespace for the site string constants.
|
||||
public enum Site {
|
||||
/// The default public origin the site is served at (scheme and host, no trailing slash): empty, which leaves the HTTPS redirect off.
|
||||
/// The default public origin the site is served at (scheme and host, no trailing slash).
|
||||
///
|
||||
/// A deployment that trusts the forwarded-protocol header without also setting `site.origin` would otherwise redirect at a host the
|
||||
/// template guessed for it, and a `301` is cached for a long time.
|
||||
/// Bootstrap writes the canonical URL it prompts for here, leaving it empty for the placeholder. An empty or non-HTTPS origin disables
|
||||
/// the HTTPS redirect, which `https.trustForwardedProto` must enable besides — a `301` is cached for a long time, so it is never issued
|
||||
/// at a host nobody named.
|
||||
public static let origin = ""
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user