From da80e64909e2f04c00f7e67eb38fd1d1da644be4 Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Wed, 20 Apr 2022 16:38:09 +0200
Subject: [PATCH] Swagger: show request host/port/scheme/ip

This makes it easier to debug reverse proxy issues/configurations.
---
 src/Resources/ApiPlatformBundle/SwaggerUi/index.html.twig | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/Resources/ApiPlatformBundle/SwaggerUi/index.html.twig b/src/Resources/ApiPlatformBundle/SwaggerUi/index.html.twig
index 87bfa96..ef4cbf8 100644
--- a/src/Resources/ApiPlatformBundle/SwaggerUi/index.html.twig
+++ b/src/Resources/ApiPlatformBundle/SwaggerUi/index.html.twig
@@ -124,6 +124,10 @@
             <br> Build: <a href="{{ app_buildinfo_url }}">{{ app_buildinfo }}</a>
             <br> Environment: {{ app_env }}
             <br> Debug: {% if app_debug %}yes{% else %}no{% endif %}
+            <br> Host: {{ app.request.getHost() }}
+            <br> Port: {{ app.request.getPort() }}
+            <br> Scheme: {{ app.request.getScheme() }}
+            <br> IP: {{ app.request.getClientIp() }}
         </div>
     </div>
 </div>
-- 
GitLab