You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provisional headers are shown
Accept:application/json, text/plain, */*
Origin:http://127.0.0.1:2080
Referer:http://127.0.0.1:2080/
User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.99 Safari/537.36
X-CSRFToken:ztouFO8vldho97bWzY9mHQioFk3j6h5V
After loading the page I see this error:
XMLHttpRequest cannot load http://127.0.0.1:8000/api/v1/dslam/events.The request was redirected to 'http://127.0.0.1:8000/api/v1/dslam/events/', which is disallowed for cross-origin requests that require preflight.
But when i send request from console it will corectly response from django server, my jquery code :
I have a Django local sever that refer to 8000 port number, And a local nginx that load 2080 port number html page.
I install django-cross-header package for resolving cross-domain error.
django-cross-header config in settings.py:
Config angularjs is like this:
Get method code in angularjs is:
request header is :
After loading the page I see this error:
XMLHttpRequest cannot load http://127.0.0.1:8000/api/v1/dslam/events.The request was redirected to 'http://127.0.0.1:8000/api/v1/dslam/events/', which is disallowed for cross-origin requests that require preflight.
But when i send request from console it will corectly response from django server, my jquery code :
request header is:
please help me
The text was updated successfully, but these errors were encountered: