From b3fa47f4a8de14064c3b087c9b51c11819fe23f8 Mon Sep 17 00:00:00 2001 From: folland87 Date: Thu, 21 Mar 2024 23:14:52 +0100 Subject: [PATCH] workflows#5 --- client/Dockerfile | 4 ++-- client/nginx.conf | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/client/Dockerfile b/client/Dockerfile index a1baaeb2..a1655c34 100644 --- a/client/Dockerfile +++ b/client/Dockerfile @@ -1,4 +1,4 @@ FROM nginx:stable -COPY ./dist /usr/share/nginx/html -COPY nginx.conf /etc/nginx/conf.d/default.conf +COPY dist /usr/share/nginx/html +COPY nginx.conf /etc/nginx/templates/nginx.conf.template EXPOSE 3000 \ No newline at end of file diff --git a/client/nginx.conf b/client/nginx.conf index 0210b1d6..f6506242 100644 --- a/client/nginx.conf +++ b/client/nginx.conf @@ -6,11 +6,14 @@ server { try_files $uri $uri/ /index.html =404; } location /api { - set $api_key $API_KEY; proxy_pass https://cluster-production.elasticsearch.dataesr.ovh; - proxy_set_header Authorization 'Basic $api_key'; + proxy_set_header Authorization 'Basic $API_KEY'; proxy_set_header Accept application/json; proxy_set_header Content-Type application/json; client_max_body_size 10M; } + location ~ ^/topics/(.*)$ { + proxy_set_header X-Real-IP $remote_addr; + proxy_pass https://ec.europa.eu/info/funding-tenders/opportunities/data/topicDetails/$1.json; + } } \ No newline at end of file