Removed unnecessary cors whitlable entry

This commit is contained in:
Pawel Kowalski 2018-08-09 14:26:21 +02:00
parent 1dd1f9f605
commit 6de819b0b2
2 changed files with 2 additions and 3 deletions

View File

@ -94,7 +94,6 @@ if DEBUG:
MIDDLEWARE += ['corsheaders.middleware.CorsMiddleware']
CORS_ORIGIN_WHITELIST = (
'localhost:8080',
'localhost:3000',
)
CORS_ALLOW_CREDENTIALS = True

View File

@ -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', {})