Removed unnecessary cors whitlable entry
This commit is contained in:
parent
1dd1f9f605
commit
6de819b0b2
|
|
@ -94,7 +94,6 @@ if DEBUG:
|
||||||
MIDDLEWARE += ['corsheaders.middleware.CorsMiddleware']
|
MIDDLEWARE += ['corsheaders.middleware.CorsMiddleware']
|
||||||
CORS_ORIGIN_WHITELIST = (
|
CORS_ORIGIN_WHITELIST = (
|
||||||
'localhost:8080',
|
'localhost:8080',
|
||||||
'localhost:3000',
|
|
||||||
)
|
)
|
||||||
CORS_ALLOW_CREDENTIALS = True
|
CORS_ALLOW_CREDENTIALS = True
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,8 @@ class PrivateGraphQLView(LoginRequiredMixin, GraphQLView):
|
||||||
def home(request):
|
def home(request):
|
||||||
if settings.DEBUG:
|
if settings.DEBUG:
|
||||||
try:
|
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:
|
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', {})
|
return render(request, 'index.html', {})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue