github.com/nginxinc/kubernetes-ingress@v1.12.5/tests/data/virtual-server-canned-responses/standard/virtual-server.yaml (about)

     1  apiVersion: k8s.nginx.org/v1
     2  kind: VirtualServer
     3  metadata:
     4    name: virtual-server
     5  spec:
     6    host: virtual-server.example.com
     7    routes:
     8    - path: "/canned-response"
     9      action:
    10        return:
    11          code: 407 # not required. the default is 200
    12          type: application/json # not required. default is text/plain
    13          body: '{
    14                   \"host\": \"${host}\",
    15                   \"request_time\": \"${request_time}\",
    16                   \"pid\": \"${pid}\",
    17                   \"server_protocol\": \"${server_protocol}\",
    18                   \"connections_active\": \"${connections_active}\",
    19                   \"connections_writing\": \"${connections_writing}\",
    20                   \"request_uri\": \"${request_uri}\",
    21                   \"remote_addr\": \"${remote_addr}\",
    22                   \"remote_port\": \"${remote_port}\",
    23                   \"server_addr\": \"${server_addr}\",
    24                   \"request_method\": \"${request_method}\",
    25                   \"scheme\": \"${scheme}\",
    26                   \"request_length\": \"${request_length}\",
    27                   \"nginx_version\": \"${nginx_version}\",
    28                   \"connection\": \"${connection}\",
    29                   \"time_local\": \"${time_local}\",
    30                   \"server_port\": \"${server_port}\",
    31                   \"server_name\": \"${server_name}\",
    32                   \"connections_waiting\": \"${connections_waiting}\",
    33                   \"request_body\": \"${request_body}\",
    34                   \"args\": \"${args}\",
    35                   \"time_iso8601\": \"${time_iso8601}\",
    36                   \"connections_reading\": \"${connections_reading}\"
    37                 }'
    38    - path: "/canned-defaults"
    39      action:
    40        return:
    41          body: |
    42            line1
    43            line2
    44            line3