From c7300ef0147e791e49ba31d368634c3152f90bae Mon Sep 17 00:00:00 2001
From: Martin Hradil <mhradil@redhat.com>
Date: Mon, 9 Oct 2023 13:26:45 +0000
Subject: [PATCH] nginx: add entry for /api, use client_max_body_size

No-Issue
---
 galaxy_ng/app/webserver_snippets/nginx.conf | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/galaxy_ng/app/webserver_snippets/nginx.conf b/galaxy_ng/app/webserver_snippets/nginx.conf
index 05f6e57647..1a9011cd50 100644
--- a/galaxy_ng/app/webserver_snippets/nginx.conf
+++ b/galaxy_ng/app/webserver_snippets/nginx.conf
@@ -8,3 +8,14 @@ location /ui/ {
     proxy_redirect off;
     proxy_pass http://pulp-api/static/galaxy_ng/index.html;
 }
+
+location /api/ {
+    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+    proxy_set_header X-Forwarded-Proto $scheme;
+    proxy_set_header Host $http_host;
+    # we don't want nginx trying to do something clever with
+    # redirects, we set the Host: header above already.
+    proxy_redirect off;
+    proxy_pass http://pulp-api;
+    client_max_body_size 0;
+}