From 6de819b0b2ac7819fad759d205bef40e13145daf Mon Sep 17 00:00:00 2001 From: Pawel Kowalski Date: Thu, 9 Aug 2018 14:26:21 +0200 Subject: [PATCH] Removed unnecessary cors whitlable entry --- server/core/settings.py | 1 - server/core/views.py | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/server/core/settings.py b/server/core/settings.py index 93fd5a54..d349dc47 100644 --- a/server/core/settings.py +++ b/server/core/settings.py @@ -94,7 +94,6 @@ if DEBUG: MIDDLEWARE += ['corsheaders.middleware.CorsMiddleware'] CORS_ORIGIN_WHITELIST = ( 'localhost:8080', - 'localhost:3000', ) CORS_ALLOW_CREDENTIALS = True diff --git a/server/core/views.py b/server/core/views.py index 0d0241d0..07928be1 100644 --- a/server/core/views.py +++ b/server/core/views.py @@ -17,8 +17,8 @@ class PrivateGraphQLView(LoginRequiredMixin, GraphQLView): def home(request): if settings.DEBUG: try: - return HttpResponse(requests.get('http://localhost:3000/{}'.format(request.get_full_path())).text) + return HttpResponse(requests.get('http://localhost:8080/{}'.format(request.get_full_path())).text) except Exception as e: - print('Can not connect to dev server at http://localhost:3000:', e) + print('Can not connect to dev server at http://localhost:8080:', e) return render(request, 'index.html', {})