(proxy []string)
| 291 | } |
| 292 | |
| 293 | func (s *Server) UpdateRootProxyForAi(proxy []string) { |
| 294 | newDir := Directive{ |
| 295 | Name: "location", |
| 296 | Parameters: []string{"/"}, |
| 297 | Block: &Block{}, |
| 298 | } |
| 299 | block := &Block{} |
| 300 | block.AppendDirectives( |
| 301 | &Directive{ |
| 302 | Name: "proxy_buffering", |
| 303 | Parameters: []string{ |
| 304 | "off", |
| 305 | }, |
| 306 | }, |
| 307 | &Directive{ |
| 308 | Name: "proxy_cache", |
| 309 | Parameters: []string{ |
| 310 | "off", |
| 311 | }, |
| 312 | }, |
| 313 | &Directive{ |
| 314 | Name: "proxy_http_version", |
| 315 | Parameters: []string{ |
| 316 | "1.1", |
| 317 | }, |
| 318 | }, |
| 319 | &Directive{ |
| 320 | Name: "proxy_set_header", |
| 321 | Parameters: []string{ |
| 322 | "Connection", "''", |
| 323 | }, |
| 324 | }, |
| 325 | &Directive{ |
| 326 | Name: "chunked_transfer_encoding", |
| 327 | Parameters: []string{ |
| 328 | "off", |
| 329 | }, |
| 330 | }, |
| 331 | &Directive{ |
| 332 | Name: "proxy_pass", |
| 333 | Parameters: proxy, |
| 334 | }, |
| 335 | ) |
| 336 | |
| 337 | newDir.Block = block |
| 338 | s.UpdateDirectiveBySecondKey("location", "/", newDir) |
| 339 | } |
| 340 | |
| 341 | func (s *Server) UpdateRootLocation() { |
| 342 | newDir := Directive{ |
no test coverage detected