Hello I am trying to open CSV file on an angularjs app front end using
var fieldsDocumentationAssetUrl = pythonApiBaseUrl + '/static/docs/fields_documentation_asset_api.csv';
var promise = $http.get(fieldsDocumentationAssetUrl).then(function(response){
$scope.fieldsDocumentationAsset = CommonUtils.processCsvFile(response.data);
});
That file is hosted on the django/python backend. I'm getting the error below but in general I am able to serve static files and this docs folder is in the static files directory. I have the django staticfiles app in installed apps, etc. How can I serve this file?
Error:
XMLHttpRequest cannot load http://localhost:5555/static/docs/api/fields_documentation_asset_api.csv. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8000' is therefore not allowed access.