I have 2 applications:
1) a Rest API on an XPTO server (using laravel 5.1), which has:
->header('Access-Control-Allow-Origin', '*.xpto.com.br')
->header('Access-Control-Allow-Credentials', 'true')
->header('Access-Control-All...
I'm trying to make the request for an API, using Axios:
axios.post('http://api.teste.com.br/v1/getToken', {
withCredentials: true,
auth: {
username: 'usuario',
password: 'password'
},
headers: {...
I have a site in ASP.NET MVC on Amazon (it follows Link ), and it has the following JsonResult:
public JsonResult getPessoas(){
List<Pessoa> pessoas = new List<Pessoa>();
for(int i = 0; i++; i < 10)
{
Pess...
I'm creating an Api with Nodejs , where I set up the application header for Cross-Origin Resource Sharing to work properly.
app.use(function (req, res, next) {
res.header("Access-Control-Allow-Origin", "http://localhost:3000");
r...
I am making the following AJAX request:
function ping(){
return new Promise((resolve, reject) => {
$.ajax({
type: "GET",
url: "localhost:5000/ping",
success: function(res){
res...
I am trying to access my API that is in localhost. However, when I try to access it, I run into the following error:
Failed to load link : The 'Access-Control-Allow-Origin' header contains multiple values' *, * ', but only one is allowed....
When I call the following URL: link directly in the browser or in POSTMAN I get the JSON correctly , but when I try to call the same link via GET in the Angle, I get the error: "Failed to load link ...: Origin ' link > 'is therefore not a...
I have an application that makes a request for a JSON via axios. Follow the function
axios.get("http://localhost/teste.json")
.then((res) => {
this.setState({value: res.data.tgt.screenPosX})
}).catch((err) => {
console.log('E...
I need to do some queries with Ionic 3 on a server whose request must be POST to be returned a JSON. Right away on the first test of creating the query in the browser inspector I get the error:
Failed to load URL:Response to preflight request...
I'm trying to use the Google Place API to get details of Places by their Id
I'm using the service provided here
link
I'm developing in ReactJs
follow error image
If anyone has already experienced something similar and can help....