Most voted "cors" questions
Cross-Origin Resource Sharing (CORS) is a specification that enables access beyond the domain from which your page or Application was loaded.
Learn more…125 questions
Sort by count of
-
32
votes2
answers55629
viewsCORS - No 'Access-Control-Allow-Origin' header is present on the requested Resource
Good evening, I’m trying to access a server from my local machine and I’m getting this answer: No 'Access-Control-Allow-Origin' header is present on the requested Resource. Origin 'http://localhost'…
-
22
votes1
answer5957
viewsWhat is the meaning of CORS?
I always see the word CORS related to an error occurred while trying to make a request XmlHttpRequest for a given page, which does not have the same domain as the origin. Example: Xmlhttprequest…
-
12
votes1
answer295
viewsCan CORS be configured for Websocket?
I have an application that needs to communicate via Websocket with two servers each on their own independent domain. It is possible to configure CORS to allow this double and simultaneous…
-
11
votes3
answers8084
viewsCORS on Nodejs without the use of Frameworks
I am creating an app in Phonegap and consumes an API provided through Nodejs. For that to happen, I need Nodejs to accept the CORS. How do I enable the CORS for Nodejs to accept the request?…
-
10
votes1
answer752
viewsWhy doesn’t CORS block Postman and derivatives?
I am creating a Restful API with Nodejs and express and in it, I am using Cors to "control" requests. In the browser works, if I make a request to this API by the console of the site here of…
-
7
votes1
answer364
viewsProblems with CORS in Django using AWS S3
My application uses a Bucket on AWS to host the static and MEDIA files, here’s the link: http://memoriasclubeturismoenv.us-east-2.elasticbeanstalk.com/gilson-rolim-02-12-2019 or…
-
6
votes2
answers244
viewsJquery iframe transport plugin works on IE10 cross Domain
I need to post xml using Federal Justice webservices, but I can only do it using IE10 in compatibility mode. I received the information that the jquery iframe transport plugin would overcome this…
-
4
votes3
answers5591
viewsHow to Configure CORS correctly in Spring Boot?
First I’ll tell you what happens! I developed a simple Spring Boot project to show on screen a GRID having as Frond-End the Angular, the request of the java API is the port 8080 and Angular is port…
-
4
votes4
answers29846
viewsRequest with Axios and React blocked by CORS policy
I’m trying to request an API using Axios: axios.post('http://api.teste.com.br/v1/getToken', { withCredentials: true, auth: { username: 'usuario', password: 'password' }, headers: {…
-
3
votes2
answers1232
viewsEnable CORS in api Rails
They’re using this one GEM to enable the CORS of my application. The code I have in my config/application.rb is as follows: config.middleware.insert_before 0, 'Rack::Cors' do allow do origins…
-
3
votes1
answer641
viewsTomcat 8, Ajax (jQuery), Jersey, REST API does not work, enable CORS
I have been trying for a while to configure CORS to work with my Tomcat 8. But whenever I have to submit the POST request, I get the error message: "Response to preflight request doesn’t pass access…
-
3
votes1
answer654
viewsAccess-Control-Allow-Origin: * does not work for all my domains
I have four applications that use the same API, and the Access-Control-Allow-Origin: * not all of them, the only application that doesn’t work is the one that I’m using Zend Framework 2 and Symfony,…
-
3
votes2
answers2148
viewsCORS JAVA (ERROR)
I’m trying to connect to an API that was made in Java, but always error when trying to connect (I want to feed a mobile application, made in JS/Cordova). When connecting (via Browser) I can, the API…
-
2
votes2
answers1107
viewsDifficulty with AJAX and JSONP
I’m having a problem returning ajax with jsonp, it returns json, but I can’t work with it. Code: $.ajax({ method: "GET", url: "http://minasul.tecnologia.ws/previsao/index.php?tipo=TODAS", async:…
-
2
votes1
answer2126
viewsAngularjs User Authentication with Java/Jersey Rest API
I am developing the user authentication module in my application and I am having some problems accessing the API, getting error 403. The old way I was doing, when I sent the request to the service,…
-
2
votes3
answers754
viewsAccess-Control-Allow_origin error not allowed
I’m trying to access another site of my.php program, but it’s returning the message: Xmlhttprequest cannot load http://177.55.99.146:8080/Autenticacao/autentica?…
-
2
votes2
answers186
viewsDjango Rest and Angularjs Cors error
I am using Django Rest and Angularjs 1.x in a project, in case this backend project and frontend are isolated, I am using a server with Gulp to run the Angularjs, but when I try to access the Rest…
-
2
votes2
answers2249
viewsHow to release CORS to a particular address?
I’m not getting the release CORS for http://localhost:8080, am using Spring Security. I find the following error: Xmlhttprequest cannot load http://localhost:9991/login. Response to preflight…
-
2
votes2
answers578
viewsFunction to create hash in SRI pattern
I was looking at a new specification W3C SRI (Subresource Integrity) which roughly means Integrity of the Sub-resource that promises to bring more security to resources hosted on third-party servers…
-
2
votes1
answer2764
viewsProblem related to CORS
In recent days I had a problem with the contact form of my site, the error in question is CORS. Well, so far so good, it’s a problem that I’m sure a lot of you have already passed. The problem in…
-
2
votes2
answers1515
viewsCross-origin requests are being blocked
I need to consult some Ceps in viacep API (https://viacep.com.br), when I run get below: vm.buscarCEP = function(){ const cep = vm.empresaResponsavel.cep //RECEBE CEP DO CAMPO const apiViaCep =…
-
2
votes0
answers39
viewsFailure of CORS when trying to convert an image
I have a variable that returns a url image: var imagem = $scope.authentication.user.imagem.toString(); I pass this variable to another method, where I intend to encode for Base64: getDataUri(imagem,…
-
2
votes1
answer8567
viewsProblem with CORS at Angular 5
Guys I’m with a test application on Angular 5 and I’m trying to consume the Webservice from the top hat. When performing this attempt the following error appears: Failed to load…
-
2
votes3
answers1642
viewsFirefox Error: Access-Control-Allow-Origin
response.setHeader("Access-Control-Allow-Origin", "*"); In the Chrome works normally. Even with the configuration Access-Control-Allow-Origin in CORS, Firefox gives error: (translated) Blocked…
-
2
votes2
answers3730
viewsCORS: Response to preflight request doesn’t pass access control check: It does not have HTTP ok status
I can get the TOKEN of my application by using Postman as follows. This works perfectly, and return me the Token. However when I try to make the same request, using Axios, in my application with…
-
2
votes1
answer919
viewsProblem with CORS using Vue + Laravel (only GET method works)
Vue: CLI 3 Laravel: 6 When trying to use different GET requests (e.g.: POST, DELETE), I get the following message: Access to Xmlhttprequest at 'http://127.0.0.1:8000/api/test' from origin…
-
2
votes0
answers80
viewsCORS error with Signalr using Usecredentials()
As it says in the title, I have a CORS problem with the Credentials using Signalr, the error returned is: Access to fetch at https://localhost:54083/notification/negotiate?negotiateVersion=1 from…
-
2
votes1
answer68
viewsAJAX request failed to use the file:/// protocol at source. How to resolve?
I am making a very simple program where I need to read a . txt file with Javascript. I am not using any IDE, I just created . html files, . js and . txt in a folder. To simplify the question, I…
-
1
votes0
answers124
viewsChanging ngResource save and using CORS (Cross Domain)
I’m developing an angled application, and I’m having a problem with the ngResource module. I need to call a URL from another system, for that I already added the necessary headers in the other…
-
1
votes0
answers100
viewsCors Api Google
I have the following request in the Google API using $http Angularjs: $http.get('http://maps.googleapis.com/maps/api/distancematrix/json?origins=Porto Alegre&destinations=Sao…
-
1
votes1
answer221
viewsCors Api Google Maps
I am developing a system made in Silex/PHP and his frontend is being done in Angularjs, I have a method in it that I am wanting him to do a search in the Google Maps API to return me a certain…
-
1
votes1
answer258
viewsCors Laravel, release only for a specific domain
I’m using the library Laravelcors and would like to block all requisites except a specific Dominio, as I do this?…
-
1
votes2
answers525
viewsHow to fix CORS error in Node.JS? (Web Crawler)
Well, me and my group of TCC we’re making a website, where his function is fetch products on various websites specializing in Hardware and show which site has the lowest price. We are making the…
-
1
votes0
answers372
viewsCORS Xmlhttprequest cannot load error
I have the following problem: Xmlhttprequest cannot load Whenever I send data from Angular to the PHP. Man PHP is like this: header('Access-Control-Allow-Origin: *');…
-
1
votes1
answer1200
viewsBlocked cross-origin request - PHP
Hello! I know there are several questions on this subject, but even reading the answers I’m still in trouble. I already tried to put Access-Control-Allow-Origin in the file header. php, I’ve tried…
-
1
votes0
answers261
viewsAccess-Control-Allow-Origin in different environments
I have a very strange problem: the same code works locally and in Prod, but does not work in Homolog. Basically, the problem is Homolog (logo on login) is this: Xmlhttprequest cannot load…
-
1
votes3
answers1300
viewsGET via jQuery on a different server, problem with CORS
I’m trying to make a call GET/AJAX for a URL which is different from the one I’m making the call, but I always get the message in the browser: Failed to load http://urldoserver.com/: No…
-
1
votes1
answer3615
viewsCORS error when requesting using Httpclient at Angular
I am trying to perform an HTTP request using "Httpclient" from Angular 4, and I get the following error: Request header field Access-Control-Allow-Origin is not allowed by…
-
1
votes0
answers46
viewsCros Origin + Spring + Angular 4/5
I’m having a problem with my restful service with spring. Even after enabling CORS, I can’t connect with my angular application. @CrossOrigin public class UsuarioController { @Autowired…
-
1
votes1
answer428
viewsLaravel Cors blocking requisicoes Xios
The configuration of my Laravel Cors is this. 'supportsCredentials' => false, 'allowedOrigins' => ['*'], 'allowedHeaders' => ['*'], 'allowedMethods' => ['*'], 'exposedHeaders' => [],…
-
1
votes1
answer104
viewsAngular 4 and Nodejs Express - Problem with CORS
Hello, I have two applications that run locally on different ports. One application is for API’s and another is the web part. When I send the form data to my typescript service, the data is arriving…
-
1
votes0
answers114
viewsCross-orgin with Laravel and vuejs
In my dilemma to publish my application I am facing some problems. I am making the front separate from the back. The frontend is in vuejs and the backend in Laravel (being only an API) On the server…
-
1
votes1
answer1270
viewsProblems configuring CORS Spring Boot permitted origin!
That’s the error message you’re giving; I’m having trouble getting my Front-End API to access my Back-End API which is a Spring Boot project, I’m sure my problem is not my Fron-End API, the problem…
-
1
votes1
answer2140
viewsSlim PHP Problem with CORS
I’m trying to make a request on the server but I’m having trouble configuring the CORS, the api was developed with the Slim Php framework and I am using middleware PSR-7 and PSR-15 CORS middleware ,…
-
1
votes1
answer1776
viewsProblem with CORS in React application
I have an application that requests a JSON via Xios. It follows the function axios.get("http://localhost/teste.json") .then((res) => { this.setState({value: res.data.tgt.screenPosX})…
-
1
votes1
answer441
viewsError http 419 Laravel-Cors?
To fix Cors failure in the Laravel api I used the package Laravel Cors and followed everything that was reported in readme, but now it is returning an error to me when making a request http post…
-
1
votes1
answer795
viewsHow to enable CORS for web page access from a different domain, in Asp.Net MVC
I am developing an application that is communicating with Secure Pag Checkout through the Web Server url https://ws.sandbox.pagseguro.uol.com.br that is working perfectly, after making the payment…
-
1
votes1
answer123
viewsHow to ensure that the generated JSON does not return error to the Customer?
I created a Web API that returns a JSON and who is having a problem similar to the question JSONP: status code 200 OK and still returns $.Ajax(... error:Function()...). Client consumes the API with…
-
1
votes0
answers48
viewsCORS error when trying to authenticate an API on localhost
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…
-
1
votes1
answer504
viewsASP NET MVC - "CORS" ERROR
Hello, I have a mistake and I can’t fix it. I have an ASP NET-MVC5 application and I carry a frame in my view that has some fonts, but they are giving the following error: Access to font at…