---
title: Functions HTTP headers reference
description: This page provides a detailed reference of the HTTP headers injected into requests for Scaleway Serverless Functions.
tags: serverless functions headers http request-id proxy
dates:
  validation: 2026-04-22
  posted: 2026-04-22
---

Scaleway Serverless Functions automatically inject several HTTP headers into every incoming request. These headers provide metadata about the request, the client, and the routing path through the Scaleway infrastructure.

You can use these headers within your function logic for logging, security, and request tracing.

## Injected headers reference

The following headers are available in the request object of your function.

| Header | Description |
| :--- | :--- |
| `X-Forwarded-For` | A standard header used to identify the originating IP address of a client connecting through an HTTP proxy or load balancer. |
| `X-Forwarded-Proto` | Indicates the protocol (HTTP or HTTPS) used by the client to connect to the container. |
| `X-Request-ID` | A unique string assigned to each incoming request to facilitate tracing and debugging. |

Alongside these headers, the following headers are set for internal purposes. Users should be careful when using them, as their presence/contents is not guaranteed:

| Header | Description |
| :--- | :--- |
| `X-Envoy-External-Address` | **Internal.** The public IP address of the client, prefer using `X-Forwarded-For`. |
| `K-Proxy-Request` |  **Internal.** Used by the underlying architecture. |

## Detailed use cases

### Request tracing and debugging

The `X-Request-ID` header is essential for distributed tracing. Each request receives a unique identifier that persists throughout the lifecycle of the request within the Scaleway ecosystem.

* **Log correlation**: Log the `X-Request-ID` at the start of your function. If a request fails, you can use this ID to search through your [Serverless Functions logs](/serverless-functions/how-to/monitor-function/) to find all entries related to that specific execution. The request ID doesn't appear by default in users logs; if wanted, users have to propagate the header value themselves.
* **Cross-service tracking**: If your function calls another service, pass the `X-Request-ID` along to maintain a consistent trace across your architecture.

### Client IP identification

While `X-Forwarded-For` contains the list of IP addresses the request has passed through, `X-Envoy-External-Address` provides a reliable way to identify the entry point of the request.

* **Security and filtering**: Use `X-Envoy-External-Address` to implement IP-based rate limiting or to allow/deny requests from specific geographic regions within your application logic.
* **Analytics**: Use this address to determine the general location of your users without relying on the internal routing IPs.

### Protocol enforcement

The `X-Forwarded-Proto` header allows your function to determine if the user is connecting over a secure connection.

* **HTTPS redirection**: If your function logic requires a secure connection, you can check if `X-Forwarded-Proto` is `http` and respond with a redirect to the HTTPS version of your endpoint.

<Message type="note">
Because Scaleway Serverless Functions are served via HTTPS by default, this header usually reflects `https` for external requests.
</Message>
