Questions tagged as 'cors'

1
answer

Ajax REST: PUT / DELETE does not work

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...
asked by 12.01.2016 / 22:04
1
answer

Request with Axios and React blocked by CORS policy

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: {...
asked by 12.12.2018 / 13:57
0
answers

Error when requesting AJAX in Elastic Beanstalk - CORS

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...
asked by 28.11.2018 / 19:21
0
answers

Access-Allow-Control-Origin does not restrict access from other domains

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...
asked by 10.12.2018 / 18:41
0
answers

Error in AJAX request for server Node.js. (readyState: 0 and status: 0)

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...
asked by 24.11.2018 / 19:04
0
answers

CORS error when trying to authenticate an API in localhost

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....
asked by 16.10.2018 / 00:58
1
answer

CORS problem when making GET call on Angular 6

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...
asked by 11.09.2018 / 22:01
1
answer

Problem with CORS in React application

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...
asked by 10.09.2018 / 20:44
0
answers

Problem with API query with Ionic

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...
asked by 11.09.2018 / 02:55
0
answers

using API Google Places error details Allow origin Cors React project

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....
asked by 26.08.2018 / 04:21