> For the complete documentation index, see [llms.txt](https://docs.defguard.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.defguard.net/2.1/for-developers/rest-api/core/system/authorize-a-request-forwarded-by-a-reverse-proxy.md).

# Authorize a request forwarded by a reverse proxy

Meant to be used as a forward-auth endpoint, for example Traefik `forwardAuth`. The original request URL is read from the `X-Forwarded-*` headers.

```json
{"openapi":"3.1.0","info":{"title":"defguard Core API","version":"2.1.0"},"tags":[{"name":"system","description":"Health check, instance info and other utility endpoints."}],"paths":{"/api/v1/forward_auth":{"get":{"tags":["system"],"summary":"Authorize a request forwarded by a reverse proxy","description":"Meant to be used as a forward-auth endpoint, for example Traefik `forwardAuth`. The original\nrequest URL is read from the `X-Forwarded-*` headers.","operationId":"forward_auth","responses":{"200":{"description":"Request is authorized."},"302":{"description":"User is not authenticated, redirect to the login page."},"500":{"description":"Unable to authorize request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}}},"components":{"schemas":{"ApiErrorResponse":{"type":"object","description":"Body returned with error responses.","required":["msg"],"properties":{"code":{"type":["string","null"],"description":"Machine-readable error code, returned for selected errors."},"msg":{"type":"string","description":"Human-readable error message."}}}}}}
```
