github.com/avenga/couper@v1.12.2/server/testdata/integration/api/01_couper.hcl (about)

     1  server "api" {
     2    error_file = "./../server_error.html"
     3  
     4    api {
     5      base_path = "/v1"
     6  
     7      error_file = "./../api_error.json"
     8  
     9      endpoint "/" {
    10        proxy {
    11          backend = "anything"
    12        }
    13      }
    14  
    15      endpoint "/proxy" {
    16        proxy {
    17          backend {
    18            origin = "http://example.com"
    19          }
    20        }
    21      }
    22  
    23      endpoint "/connect-error" {
    24        proxy {
    25          backend {
    26            connect_timeout = "2s"
    27            origin = "http://1.2.3.4"
    28          }
    29        }
    30      }
    31    }
    32  }
    33  
    34  definitions {
    35    # backend origin within a definition block gets replaced with the integration test "anything" server.
    36    backend "anything" {
    37      path = "/anything"
    38      origin = env.COUPER_TEST_BACKEND_ADDR
    39    }
    40  }