Fix: Add missing '=' in error_page directive

This commit is contained in:
Mr. Erlison 2024-07-31 09:41:16 -03:00
parent 1ff37aa7f8
commit f206605cdf
2 changed files with 1 additions and 3 deletions

View file

@ -186,8 +186,6 @@ func TestCrossplaneTemplate(t *testing.T) {
tplConfig.Cfg.UpstreamKeepaliveTimeout = 200
tplConfig.Cfg.UpstreamKeepaliveRequests = 15
tplConfig.Cfg.CustomHTTPErrors = []int{400, 404, 501}
tpl = crossplane.NewTemplate()
tpl.SetMimeFile(mimeFile.Name())
content, err := tpl.Write(tplConfig)

View file

@ -285,7 +285,7 @@ func (c *Template) buildHTTP() {
}
for _, v := range cfg.CustomHTTPErrors {
httpBlock = append(httpBlock, buildDirective("error_page", v,
httpBlock = append(httpBlock, buildDirective("error_page", v, "=",
fmt.Sprintf("@custom_upstream-default-backend_%d", v)))
}