| # Licensed to the Apache Software Foundation (ASF) under one | |
| # or more contributor license agreements. See the NOTICE file | |
| # distributed with this work for additional information | |
| # regarding copyright ownership. The ASF licenses this file | |
| # to you under the Apache License, Version 2.0 (the | |
| # "License"); you may not use this file except in compliance | |
| # with the License. You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| # See the License for the specific language governing permissions and | |
| # limitations under the License. | |
| meta: {version: "1.0"} | |
| urtest: | |
| description: "Verify TSHttpTxnVerifiedAddrSet supplies the inbound address to header_rewrite" | |
| requires: {plugins: [header_rewrite.so]} | |
| server: {name: "verified-address-origin"} | |
| client: {name: "verified-address-client"} | |
| ats: | |
| name: "verified-address-ts" | |
| process_config: {enable_cache: false} | |
| copy_custom_plugin: | |
| - "{AtsBuildUraniumTestsDir}/pluginTest/tsapi/.libs/test_TSHttpTxnVerifiedAddr.so" | |
| copy_to_config_dir: ["hrw_verified_addr.conf"] | |
| plugin_config: | |
| - "test_TSHttpTxnVerifiedAddr.so" | |
| - "header_rewrite.so --inbound-ip-source=PLUGIN {CONFIG_DIR}/hrw_verified_addr.conf" | |
| records_config: | |
| proxy.config.diags.debug.enabled: 1 | |
| proxy.config.diags.debug.tags: "http|test_TSHttpTxnVerifiedAddr" | |
| remap_config: | |
| - "map /get http://127.0.0.1:{SERVER_HTTP_PORT}/get" | |
| sessions: | |
| - transactions: | |
| - all: {headers: {fields: [[uuid, verified-address]]}} | |
| client-request: | |
| method: GET | |
| url: /get | |
| version: "1.1" | |
| headers: {fields: [[Host, verified.example]]} | |
| server-response: | |
| status: 200 | |
| headers: {fields: [[Content-Length, 0], [Connection, close]]} | |
| proxy-response: | |
| status: 200 | |
| headers: {fields: [[ip, "1.1.1.1"]]} |