Add option to configure the redirect code
This commit is contained in:
parent
120bb1deb0
commit
161b485ae0
4 changed files with 51 additions and 4 deletions
|
|
@ -425,6 +425,11 @@ type Configuration struct {
|
|||
|
||||
// LocationSnippet adds custom configuration to all the locations in the nginx configuration
|
||||
LocationSnippet string `json:"location-snippet"`
|
||||
|
||||
// HTTPRedirectCode sets the HTTP status code to be used in redirects.
|
||||
// Supported codes are 301,302,307 and 308
|
||||
// Default: 308
|
||||
HTTPRedirectCode int `json:"http-redirect-code"`
|
||||
}
|
||||
|
||||
// NewDefault returns the default nginx configuration
|
||||
|
|
@ -449,6 +454,7 @@ func NewDefault() Configuration {
|
|||
ComputeFullForwardedFor: false,
|
||||
HTTP2MaxFieldSize: "4k",
|
||||
HTTP2MaxHeaderSize: "16k",
|
||||
HTTPRedirectCode: 308,
|
||||
HSTS: true,
|
||||
HSTSIncludeSubdomains: true,
|
||||
HSTSMaxAge: hstsMaxAge,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue