From 8ce5dc0aedd1f18556a6825c056f3ee083895629 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Mon, 15 Nov 2021 05:13:17 +0100 Subject: [PATCH] fix: Caddy proxy configuration --- tutormfe/patches/caddyfile | 8 ++++++-- tutormfe/patches/nginx-extra | 24 ------------------------ 2 files changed, 6 insertions(+), 26 deletions(-) delete mode 100644 tutormfe/patches/nginx-extra diff --git a/tutormfe/patches/caddyfile b/tutormfe/patches/caddyfile index ab71c45b..73d0355b 100644 --- a/tutormfe/patches/caddyfile +++ b/tutormfe/patches/caddyfile @@ -1,3 +1,7 @@ -{{ MFE_HOST }}{% if not ENABLE_HTTPS %}:80{% endif %} { - reverse_proxy nginx:80 +{{ MFE_HOST }}{$default_site-port} { + respond / 204 + request_body { + max_size 2MB + } + import proxy "mfe:8002" } diff --git a/tutormfe/patches/nginx-extra b/tutormfe/patches/nginx-extra deleted file mode 100644 index 16bcec3c..00000000 --- a/tutormfe/patches/nginx-extra +++ /dev/null @@ -1,24 +0,0 @@ -# MFE service -upstream mfe-backend { - server mfe:8002 fail_timeout=0; -} -server { - listen 80; - server_name {{ MFE_HOST }}; - - # Disables server version feedback on pages and in headers - server_tokens off; - - # We should not have to post much data to the MFE server - client_max_body_size 2m; - - location = / { - return 204; - } - - location / { - proxy_set_header Host $http_host; - proxy_redirect off; - proxy_pass http://mfe-backend; - } -}