From 65ea5f95e24a25e51bfb1de3d66eaa7ef8f24573 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Thu, 11 Apr 2019 21:45:07 +0400 Subject: [PATCH] :bug: Fix frontend hijacking /docs in development (#6) * :bug: Fix frontend hijacking /docs in development * :bug: Fix frontend Dockerfile copying Nginx config --- {{cookiecutter.project_slug}}/frontend/Dockerfile | 1 + .../frontend/nginx-backend-not-found.conf | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 {{cookiecutter.project_slug}}/frontend/nginx-backend-not-found.conf diff --git a/{{cookiecutter.project_slug}}/frontend/Dockerfile b/{{cookiecutter.project_slug}}/frontend/Dockerfile index fb25c36faf..75157e0968 100644 --- a/{{cookiecutter.project_slug}}/frontend/Dockerfile +++ b/{{cookiecutter.project_slug}}/frontend/Dockerfile @@ -25,3 +25,4 @@ FROM nginx:1.15 COPY --from=build-stage /app/dist/ /usr/share/nginx/html COPY --from=build-stage /nginx.conf /etc/nginx/conf.d/default.conf +COPY ./nginx-backend-not-found.conf /etc/nginx/extra-conf.d/backend-not-found.conf diff --git a/{{cookiecutter.project_slug}}/frontend/nginx-backend-not-found.conf b/{{cookiecutter.project_slug}}/frontend/nginx-backend-not-found.conf new file mode 100644 index 0000000000..f6fea66358 --- /dev/null +++ b/{{cookiecutter.project_slug}}/frontend/nginx-backend-not-found.conf @@ -0,0 +1,9 @@ +location /api { + return 404; +} +location /docs { + return 404; +} +location /redoc { + return 404; +}