From 4274951c73ca77972005c4ae2e3432a2c114c917 Mon Sep 17 00:00:00 2001 From: Narayana Date: Wed, 8 Mar 2023 16:53:41 +0530 Subject: [PATCH] . --- apiserver/plane/settings/common.py | 1 + nginx/nginx.conf | 19 ++----------------- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/apiserver/plane/settings/common.py b/apiserver/plane/settings/common.py index 9d270662e..364401f1b 100644 --- a/apiserver/plane/settings/common.py +++ b/apiserver/plane/settings/common.py @@ -21,6 +21,7 @@ INSTALLED_APPS = [ "django.contrib.auth", "django.contrib.contenttypes", "django.contrib.sessions", + "corsheaders", # Inhouse apps "plane.analytics", "plane.api", diff --git a/nginx/nginx.conf b/nginx/nginx.conf index ee3e1188b..cb2b895a6 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -3,33 +3,18 @@ events { } http { sendfile on; - upstream django { - server planebackend:8000; - } - upstream nextjs { - server planefrontend:3000; - } + server { listen 80; root /www/data/; access_log /var/log/nginx/access.log; location / { - proxy_pass http://planefrontend:3000/; - proxy_set_header Host $host; - add_header Access-Control-Allow-Origin *; - add_header Access-Control-Allow-Credentials true; } location /api/ { proxy_pass http://planebackend:8000/api/; - proxy_set_header Host $host; - add_header Access-Control-Allow-Origin *; - add_header Access-Control-Allow-Credentials true; - } - error_page 500 502 503 504 /50x.html; - location = /50x.html { - root /usr/share/nginx/html; } + } } \ No newline at end of file