Questions tagged [cors]

CORS (Cross-Origin Resource Sharing) allows browsers' XMLHttpRequest object to make cross-origin requests.

Filter by
Sorted by
Tagged with
0
votes
1answer
33 views

Problem with CORS Policy when call to API with SPFx

have problem with CORS Policy. Get an error: Access to fetch at 'https://XXX.azurewebsites.net/api/protocols' from origin 'https://localhost:4321' has been blocked by CORS policy: No 'Access-Control-...
5
votes
1answer
7k views

SPFx calls blocked by CORS policy

I'v been trying to access various apis through SPFx and I am constantly seeing this issue. I do not know how to fix this can anyone assist or explain what I am doing wrong or missing? This works ...
1
vote
0answers
53 views

Problem making 3rd party API POST calls using SPFx

I need to fetch few details from the 3rd party API so I am making a POST request (required by the API) to that API using HttpClient But every time I am getting the below error. Access to fetch at '...
1
vote
1answer
60 views

Icon missing and access to XMLHttpRequest at officeapps url got CORS error

I am developing a SPFX extension. While I am debug it at my SP online site using debug script, I found the icons are not showing up. Those icon are <i className="ms-Icon ms-Icon--PageEdit &...
0
votes
0answers
33 views

Calling Enterprise api from SPFx

I’m facing this issue where I try to call an enterprise api from SPFx code. These api’s are made in Oracle REST Data Services and use the Azure AD authentication via an Azure App registration which ...
0
votes
1answer
65 views

How can I make a GET request with Headers to an external API?

From a SP Online SPFx Web Part (No Javascript Framework), I've been trying to do a GET request to an API that expects some headers and nothing works. If use Postman, with the same URL and Headers it ...
0
votes
1answer
24 views

CORS and pre-flight OPTIONS - Disable authentication for single page

I'm struggling with a CORS request to our SharePoint 2010 server. It seems that the CORS request to the SharePoint server requires authentication, which the pre-flight of the CORS-request does not ...
0
votes
0answers
27 views

SharePoint Hosted Add In REST API works only with Farm Account

I have a requirement to get SharePoint list items having access to current user in SharePoint Hosted Add In. As the project was developed using CSOM (C#) through WEB API and the API was hosted in ...
1
vote
2answers
6k views

How to add multiple URL to Access-Control-Allow-Origin header in SharePoint 2013 web.config

To resolve the CORS issue I have added the following headers in the web.config file of SharePoint 2013 <add name="Access-Control-Allow-Origin" value="http://localhost:4200" /> <add name="...
3
votes
2answers
130 views

Search page not showing after URL rewrite on reverse proxy

Our SharePoint 2016 on-premise farm have setup Internet access. Our reverse proxy have setup URL rewrite from 'https://www.mysharepoint.com' (Internet URL) to https://server_wfe1/ (our web front end ...
0
votes
2answers
59 views

Front-end connection between two site-collections

I have two site collections on the same farm (on-prem SP 2016), but different domains (business.* and projects.*). I have full control on both sites. And yet, I cannot access one from the other. I ...
1
vote
0answers
15 views

cross domain issue in sharepoint 2013 while accessing sharepoint list items using Ajax

i have written Rest Ajax call to fetch sharepoint 2013 list items from another sitecollection which works fine in IE but when same in chrome throws error CORS, cross domain issue. Am looking for ...
3
votes
0answers
993 views

Calling ASP.NET Web API 2 from an SPFx webpart

I am facing an issue with authenticating my SPFx webpart against an Azure AD backed Web API. What I have done so far is Created a ASP.NET WEB API 2 project. Added OWIN and configured CORS and OIDC in ...
1
vote
0answers
18 views

Workflow 2013 http request with credentials

I have a C# WebApi2 endpoint with CORS and SupportsCredentials activated. What I'm trying to do is to call this endpoint from a Workflow. How do I pass the credentials?
0
votes
3answers
3k views

“Cross-Origin Request Blocked” - how to bypass for REST queries

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource" I'm trying to use REST api to query a library to find all the file names in it so that I can populate a ...
1
vote
1answer
3k views

Error : “The 'Access-Control-Allow-Origin' header contains multiple values” while enabling CORS in SharePoint 2013

I am trying to access SharePoint Document Library Data from outside application through rest api. Below is the code I am using. function readSPRestApi() { console.log("Calling Api.."); ...
1
vote
0answers
160 views

Trying to do a POST from SP to Service Now

I have been trying to do a post in Service Now through an angularjs form in SP, however I am always getting a CORS error. I've taken all CORS rules from Service Now and still am getting this error and ...
0
votes
1answer
80 views

show images from host-web in add-in (app web) CORS problem

I need to display images from the host web in an add-in, without the user necessarily having visited the host web. Is this achievable? The images are stored as item attachments in a list, and I've ...
2
votes
0answers
725 views

is on-premise Sharepoint 2016 REST API possible with oauth?

I have a Sharepoint 2016 server and a python web server. I would like to read data from Sharepoint with my python server. I was able to do this on Office 365 on the cloud but did not find much ...
7
votes
1answer
561 views

CORS problems upload.aspx dialog

I'm trying to upload a file and to show the Upload.aspx dialog from an external web site. I have this code: function openUploadNewDocumentDialog(passingID) { var dialogOptions = SP.UI.$...
2
votes
1answer
2k views

AJAX POST REST call generates CORS error

My SharePoint client JavaScript is calling an external REST API URL, using the code pattern below $.ajax({ type: "POST", url: 'https:\\theexternal.domain......, contentType: "application/json", ...