Header Modification
TOC
Basic Concepts
When a request is received, header modification allows adjusting request headers before forwarding to the backend. Similarly, when a response is received, it allows adjusting response headers before they are returned to the client.
use annotations
Annotation values are JSON strings containing the config.
Note: in *_var maps the key is the header name and the value is the ALB context variable name.
For example, add the following annotation to an Ingress:
will add key x-my-host and value of request host header to request header.
you can refer to the nginx variable for the variable names.
ALB provides additional variables:
examples
To add an Authorization header from a cookie, you can use:
To set HSTS, you can use: