github.com/avenga/couper@v1.12.2/server/testdata/file_serving/conf_fileserving.hcl (about)

     1  server "fileserving-tests" {
     2      hosts = ["example.com:0"]
     3  
     4      error_file = "./error.html"
     5  
     6      files {
     7          document_root = "./htdocs"
     8      }
     9  
    10      spa {
    11          bootstrap_file = "./htdocs/spa.html"
    12          paths = [
    13              // files win
    14              "/dir/**",
    15              "/app/**",
    16              // api wins
    17              "/api/**",
    18              // spa wins
    19              "/",
    20          ]
    21      }
    22  
    23      spa "myapp" {
    24          bootstrap_file = "./htdocs/my_app/spa.html"
    25          paths = [
    26              "/my_app",
    27              "/my_app/**"
    28          ]
    29          bootstrap_data = {
    30              framework: "react.js"
    31          }
    32      }
    33  
    34      api {
    35          base_path = "/api"
    36          error_file = "./error.json"
    37          endpoint "/foo/**" {
    38              proxy {
    39                  backend {
    40                      path = "/**"
    41                      origin = "{{.origin}}"
    42                      hostname = "test.couper.io"
    43                  }
    44              }
    45          }
    46      }
    47  }