> For the complete documentation index, see [llms.txt](https://docs.fortifiedid.se/information-endpoint/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fortifiedid.se/information-endpoint/informationendpoint.md).

# InformationEndpoint

## Introduction

The InformationEndpoint module serves branded information or error pages from local web roots. Each configured endpoint can render a template and publish its related static files.

## Configuration

{% hint style="info" %}
**Module name:** `InformationEndpoint`
{% endhint %}

{% tabs %}
{% tab title="Properties" %}

<table><thead><tr><th>Name</th><th>Description</th><th>Default</th><th data-type="checkbox">Mandatory</th></tr></thead><tbody><tr><td><code>http_context</code></td><td>Base HTTP context shared by the configured endpoints.</td><td><code>"/infoendpoint"</code></td><td>false</td></tr><tr><td><code>endpoint</code></td><td>Array of endpoint configuration objects.</td><td><code>[]</code></td><td>false</td></tr><tr><td><code>endpoint[].context_path</code></td><td>Route mounted below <code>http_context</code>.</td><td><code>""</code></td><td>false</td></tr><tr><td><code>endpoint[].template</code></td><td>Template rendered at the endpoint root. A relative path is resolved below <code>webroot_dir</code>.</td><td><code>""</code></td><td>true</td></tr><tr><td><code>endpoint[].webroot_dir</code></td><td>Directory containing the template and static files.</td><td><code>"web/infoendpoint"</code></td><td>false</td></tr><tr><td><code>endpoint[].overlay_dir</code></td><td>Single overlay directory whose files take precedence over <code>webroot_dir</code>.</td><td><code>""</code></td><td>false</td></tr><tr><td><code>endpoint[].overlay_dirs</code></td><td>Ordered array of additional overlay directories.</td><td><code>[]</code></td><td>false</td></tr></tbody></table>
{% endtab %}

{% tab title="Example" %}

```json
{
  "name": "InformationEndpoint",
  "config": {
    "http_context": "/userinfo",
    "endpoint": [
      {
        "context_path": "/generic",
        "template": "generic_error.html",
        "webroot_dir": "web/infoendpoint",
        "overlay_dir": "web/customer-overlay"
      }
    ]
  }
}
```

{% endtab %}
{% endtabs %}

This example redirects `/userinfo/generic` to `/userinfo/generic/`, renders `web/infoendpoint/generic_error.html` at the endpoint root, and serves other files from the web root or overlay.

{% hint style="warning" %}
Each endpoint must have a unique route. If `webroot_dir` does not exist, the endpoint is ignored during startup.
{% endhint %}

## Trace ID in templates

Use `{{traceid}}` in the template to include the request trace ID. The module resolves it in this order:

1. The `trace_id` query parameter.
2. The current HTTP session's trace ID.
3. The literal value `Unknown`.

The value is HTML-escaped before it is inserted into the template. Query parameters are preserved when a request is redirected to the trailing-slash URL.

```html
<p>Reference: {{traceid}}</p>
```

Template responses use `Content-Type: text/html; charset=UTF-8` and headers that prevent caching. Files requested directly from the web root are served without template expansion.
