1
I am trying to access my API that is on localhost. However, when trying to access it, I come across the following error:
Failed to load http://127.0.0.1:8000/api/login: The 'Access-Control-Allow-Origin' header contains Multiple values '*, *', but only one is allowed. Origin 'http://127.0.0.1' is therefore not allowed access.
You will need to configure something in particular in my apache or coding fault in my app-config.js (I am using Angularjs) ?
app-config:
(function () {
'use strict';
app.constant('AppConfig', {
AppTitle: 'testeBase',
ApiUrl: 'http://127.0.0.1:8000/api/'
});
})();
I’m using xampp. Where can I find this code?
– user108720
Your API, was developed in what language? Are you using any specific framework?
– Raphael Godoi
Ai ta saying that the header is set twice. Post the file code of the api you are accessing and maybe the file . htaccess
– edson alves