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
-
1
votes1
answer448
viewsCors error in the Laravel when using middleware jwt.auth
When I try to make an http request inside my jwt.auth middleware I receive: :9000/#/Dash/typeproducts:1 Access to Xmlhttprequest at 'https://api2.jcontrole.com.br/api/notificacoes/gerais' from…
-
1
votes1
answer597
viewsProblem CORS Angular + Protheus
I’ve looked in some places and I can’t find anything about it, I’d like to know if anyone’s been through it and can help me. I am trying to make a REST request through an Angular application running…
-
1
votes1
answer3166
viewsConfigure CORS on a PHP page with Basic Athenticate
I posted the page php test. in the field: https://www.teste.com/api/teste.php <?php header("Access-Control-Allow-Origin: *"); header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1…
-
1
votes1
answer93
viewsCORS blocks the requests
Hello, I’m developing a web application with Vue JS in a discipline and another person is making a Rest api with Spring, but when I run the api locally and try to access some of the resources…
-
1
votes3
answers11983
viewsAccess-Control-Allow-Origin error with Xmlhttprequest()
Hello, I’m having the following mistake: No 'Access-Control-Allow-Origin' header is present on the requested Resource. Already researched and the solution I find is to add:…
-
1
votes1
answer488
viewsOPTIONS request not reaching the server
I am making POST requests by sending and receiving JSON in my PHP API. When I’m on the localhost it works as expected, but when I’m in production I get the error below on Chromium: OPTIONS…
-
1
votes1
answer1924
viewsRequest is presenting Cross-Origin Request Blocked in Reactjs app
I am developing an application in React and previously created a restful API with Node and express, in my api I added the module Cors const cors = require('cors'); and added it at the boot of the…
-
1
votes2
answers835
views -
1
votes0
answers82
viewsHow to set up CORS in Springboot?
Recently I decided to try developing in java with Spring boot. I’m not very experienced in this framework. I tried to make a complete application, with back-end with this technology and front-end…
-
1
votes1
answer74
viewsCors error in application dotnet core + React web app
I have an application problem that when I send files via POST and the image is larger in Mb Cors error occurs, images of a few kb work normally. Dotnet core api In the api I already added Cors and…
-
1
votes1
answer90
viewsCORS policy . net core and angular 8
I’m having problems with CORS policy. I pulbligated a site on IIS and did not put host name (accessed by IP). When I put the host name (www.nome-do-site.com) the system stopped working and the…
-
0
votes1
answer347
viewsError calling REST with Angularjs
I’m using the angular $http to make REST calls on my server, but I’m having a problem: No 'Access-Control-Allow-Origin' header is present on the requested Resource. Origin 'null' is therefore not…
-
0
votes0
answers1096
viewsPHP Access-Control-Allow-Origin - CORS - Localhost
I am trying to access a localhost application by another application that is also local, but on another IP and port and I can not at all. I have tried every way and always appears the same error:…
-
0
votes2
answers87
viewsCross origin not working with angulasJS and PHP
I am trying to download a file through the generating Angularjs in a php page: PHP page header("Access-Control-Allow-Origin: *"); include('conn.php'); $arquivo = 'Contratos_Pendentes.xls'; $tabela =…
-
0
votes1
answer34
viewsChanging a field with a respective color
I’m having a doubt not your where to start I have a project based on an hourly calendar in which this calendar has a table with several squares and I need to change the color of these squares with…
-
0
votes0
answers12
viewsChanging a field with a respective color and returning to the database
I have a project that has a schedule calendar in which this calendar has a table with several square and I must change the color of these squares with some colors corresponding to a status and I…
-
0
votes1
answer426
viewsAjax 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',…
-
0
votes0
answers374
viewsProblems with CORS in application using API with Slim framework and Angularjs
Good afternoon friends I’m having trouble solving a problem Requisição cross-origin bloqueada: A política de mesma origem (Same Origin Policy) impede a leitura do recurso remoto em…
-
0
votes0
answers122
viewsIs it possible to resolve the No 'Access-Control-Allow-Origin' error on the front end?
Personal need to consume a third party API with Javascript, I do not have access to release Cors in the API.. and this error is appearing as I can solve ? I have the following request using Axios:…
-
0
votes1
answer61
viewsConsume this JSON because I am encountering an error
I have this JSON: API JSON But when I consume it I get this error VM414 index.html:1 Access to fetch at 'https://thaleshenrique38.000webhostapp.com/products.json' from origin 'http://127.0.0.1:5500'…
-
0
votes1
answer276
viewsAllow requests only for a specific Nodejs route?
I’m trying to create an API gateway, which is going really well. However, when trying to get a microservice to accept ONLY requests through the gateway, I am having trouble. I want any external…
-
0
votes0
answers25
viewsCROSS error via localhost
I am consuming an angled API and gives me the following error to : Access to Xmlhttprequest at 'http://localhost:8080/batches' from origin 'http://localhost:4200' has been blocked by CORS policy: No…
-
0
votes1
answer141
viewsError "content-type is not allowed by Access-Control-Allow-Headers in preflight Response." -API Climatempo
Hello, I have a problem with CORS in the Climatempo API, my request code is this: var api_url = '"http://apiadvisor.climatempo.com.br/api/v1/anl/synoptic/locale/BR?token=TOKEN"'; $.ajax({ url:…
-
0
votes1
answer333
viewsHTTP Access Control (CORS) for multiple domains
How to free HTTP Access Control (CORS) of images using Xmlhttprequest for all domains below on . htaccess and not using global permission with "*": Access-Control-Allow-Origin:…
-
0
votes0
answers67
viewsTwo questions regarding the use of the Corsregistry.allowOrigins() method
I’m trying to do a post type resquest with credentials (token) for my spring boot built api. But I’m having trouble specifying the source I pass as a parameter to the method…
-
0
votes0
answers271
viewsProblem extracting token from incoming request header in Spring boot. Httpservletrequest.getHeader("Authorization") == null;
I made a CRUD API using Spring boot and used authentication and authorization in this CRUD with JWT (JSON web token). I have a tokenFilter class in my API which is responsible for validating tokens…
-
0
votes0
answers86
views"Uncaught Syntaxerror: Unexpected token :" and "Access-Control-Allow-Origin"
Guys I’m trying to do a Mailchimp integration, but I’m having problems with this mistake: 1 - Access-Control-Allow-Origin 2 - Uncaught Syntaxerror: Unexpected token : I can’t find the problem. You…
-
0
votes0
answers59
viewsPHP file requested by jQuery to respond only to the domain itself
I made a code .ajax() jQuery to avoid direct access to PHP files, but would like to improve the security of the requested PHP files, read on Access-Control-Allow-Origin and other tips, but I…
-
0
votes1
answer372
viewsAngular login visible in the request header
Everybody, Good afternoon. I need some help. My backend was written in nodejs and this one on IIS. My frontend is in angular and it’s still on my machine being debugged. My login page is working as…
-
0
votes0
answers256
viewsNo 'Access-Control-Allow-Origin' header is present on the requested Resource. - MEAN STACK
Hello! I need to pass a string to Node and am receiving the following response in the browser console: Failed to load http://localhost:3003/api/buscarCep: No 'Access-Control-Allow-Origin' header is…
-
0
votes1
answer483
viewsCross-Origin Golang with Gorilla/Mux
In my application I am using the package gorilla/mux next to the gorilla/handlers to enable/configure the CORS of my application, I currently have an GO and a frontend application in vue, in my…
-
0
votes1
answer40
viewsNodejs ignores request POST made by Angular
Context: I’m using a virtual machine , ng serve is running on port 4200, and the nodejs on port 8024, when I try to send data to the server nothing happens, the angular part apparently shows no…
-
0
votes1
answer491
viewsCors error accessing Api
I am trying to access a wikipedia service with JQ, but in returning Cors error, could someone help me with a code to access this service correctly. Url:…
-
0
votes1
answer765
viewsCORS problem when making GET call at Angular 6
When I call the following URL: https://script.google.com/macros/s/AKfycbxk616n8wjgGeHZIc3Hm66Kcv4ZtWKZJQnEKLsxZC9LpoDK8mQZ/exec directly in the browser or in POSTMAN I get JSON correctly, but when I…
-
0
votes1
answer232
viewsHow to consume an API "without permission"
In the searches I did, I found that it is not possible to consume an API if you do not release your host on the server(back-end), but I hope you are mistaken, this is the reason for this question,…
-
0
votes0
answers78
viewsAccess-Allow-Control-Origin does not restrict access from other domains
I am creating an Api with Nodejs, where I set the application header to work properly Cross-Origin Resource Sharing. app.use(function (req, res, next) { res.header("Access-Control-Allow-Origin",…
-
0
votes1
answer2001
viewsXmlhttprequest failing due to No 'Access-Control-Allow-Origin' [React/Mongo/Axios]
I have a backend running on localhost with the following code: server.js: const port = 3003 const bodyParser = require('body-parser') const express = require('express') const server = express()…
-
0
votes1
answer221
viewsClass does not exist CORS Standard
I’m trying to implement a Cors middleware on the Laravel, but you’re saying my class doesn’t exist: "message": "Class App Http Middleware CORS does not exist", "Exception": "Reflectionexception",…
-
0
votes0
answers32
viewsCORB does not allow display JSON response
Provided an API that returns the following JSON: { "ResponseStatus": { "ResponseCode": 0, "ResponseMessage": "Success." }, "Events": [ { "CodEspec": 65957, "NomeEspec": "O PIOR ESPETÁCULO DO MUNDO",…
-
0
votes1
answer254
viewsBlocked cross-origin request when creating a box
Hello I’m starting in React and I came across a problem, I’m trying to make an app similar to Dropbox, on the main screen you create a box and can upload files, but when I click create this message…
-
0
votes1
answer249
viewsError while consuming Swagger api from the transparence portal
Using this code to consume the api is giving an error in cross-Omain $('#seguro').click(function(){ cpf = $('#cpf').val(); endapitrans =…
-
0
votes0
answers552
viewsCross-Origin Request works on Postman, but not on frontend
I need to access my API for sending emails, but every time I try to do it through my application’s frontend I get a CORS error saying Cross-Origin Request Blocked: The Same Origin Policy disallows…
-
0
votes1
answer101
viewsAllow https source access
I developed a Node api using restify only for real-time warnings, but came across a https problem: If the origin of the request comes from an https site the api does not work My Cors on the Node is…
-
0
votes1
answer325
viewsCORS not being applied - Spring Boot
I have a Spring Boot configuration class to handle CORS. This class theoretically allows all origins, all methods and with all headers. @Configuration public class CorsConfiguration implements…
-
0
votes0
answers107
views -
0
votes0
answers169
viewsOnly GET request works, POST, PUT and DELETE this locked
I am implementing the Entityframework in a system that is based on selects, Insert... When I make a request POST or PUT this giving second error. The get method is working normally. .net 4.7.2 By…
-
0
votes1
answer497
viewsRequest blocked by CORS - Vue and Spring Boot
I have a Spring Boot API and a Vue application, both running locally, but I can’t make a PUT request from the Vue application for API. If you send a GET request, it works perfectly. I tried,…
-
0
votes0
answers381
viewsProblem with Cors C# Asp. Net
I’m having enough trouble solving a CORS error. I am following the following steps: I added the CORS Nuget package to my project. I’m adding the code config.EnableCors(); in my class startUp. I…
-
0
votes1
answer895
viewsCORS is not enabling
I developed a API REST in Node.js and I need to use it in my front-end. I’ve installed the library Cors and enabled on my server but continues to give the error of access when making the request…
-
0
votes0
answers136
viewsPUT AJAX api Climatempo returning CORS error
Hello, I’m having problems performing a PUT in AJAX with the weather api, my code is this : var URL = 'http://apiadvisor.climatempo.com.br/api-manager/user-token/TOKEN/locales'; $.ajax({ url: URL,…