> For the complete documentation index, see [llms.txt](https://help.autify.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.autify.com/nocode-web/en/autify-university/advanced/tests-on-private-environments/add-http-headers-and-client-certificate-for-test-execution.md). Agents can also search and read this documentation through its [MCP server](https://help.autify.com/~gitbook/mcp).

# Add HTTP headers and Client Certificate for test execution

You can add request headers or use a client certificate for mTLS authentication by placing a proxy server between Autify Connect Client and your application under test (hereinafter "AUT").

This article shows two examples that use [mitmproxy](https://mitmproxy.org/) as a proxy server between Autify Connect Client and AUT. One is to add request headers to HTTP requests to AUT, and the other is to use a client certificate for mTLS authentication.

Note: We do not guarantee anything about mitmproxy since it is not our product.

## Adding request headers

![](https://1964297753-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVdZPTgwISYb3LhjgKnw6%2Fuploads%2Fgit-blob-ba0164285fa40a17514e683e176710319fb454ab%2Fusing-mitmproxy-for-custom-request-headers_en.png?alt=media)

As the above figure shows, the mitmproxy server should be placed between Autify Connect Client and AUT. For example, to add custom headers to manage sessions:

1. Receive the session from AUT with a headless browser
2. Start the mitmproxy server after adding the session to the header modification configurations of mitmproxy
3. Start the Autify Connect Client server, setting the mitmproxy server as the proxy server

Refer to the following official document to learn about the header modification configurations of mitmproxy.

* [Modify Headers - mitmproxy](https://docs.mitmproxy.org/stable/overview-features/#modify-headers)

Refer to the following article to learn about the configurations to use the proxy between Autify Connect Client and AUT.

* [Configuration when using a Proxy server](https://help.autify.com/nocode-web/en/autify-university/advanced/tests-on-private-environments/configuration-when-using-a-proxy-server.md)

## Using a client certificate

![](https://1964297753-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVdZPTgwISYb3LhjgKnw6%2Fuploads%2Fgit-blob-64910bad5fc8d20ff4d2868f8ddb07199a78f925%2Fusing-mitmproxy-for-client-certificate_en.png?alt=media)

As the above figure shows, the mitmproxy server should be placed between Autify Connect Client and AUT. To use a client certificate, specify it in the mitmproxy options when the server is starting. Once the client certificate is configured, it will be used during the handshake for mTLS.

Refer to the following official document to learn about how to configure the client certificate in mitmproxy.

* [Using a client side certificate - mitmproxy](https://docs.mitmproxy.org/stable/concepts-certificates/#using-a-client-side-certificate)

Refer to the following article to learn about the configurations when using the proxy between Autify Connect Client and AUT.

* [Configuration when using a Proxy server](https://help.autify.com/nocode-web/en/autify-university/advanced/tests-on-private-environments/configuration-when-using-a-proxy-server.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.autify.com/nocode-web/en/autify-university/advanced/tests-on-private-environments/add-http-headers-and-client-certificate-for-test-execution.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
