From 9642b11bb477f9e564932ab6a3b1dad63b0b1cb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Thu, 11 Apr 2019 21:51:57 +0400 Subject: [PATCH] :bug: Fix frontend hijacking /docs in development (#14) * :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 fb25c36..75157e0 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 0000000..f6fea66 --- /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; +}