AnsweredAssumed Answered

PI Web API Cross Origin Problem

Question asked by brendan.john on Jun 14, 2018
Latest reply on Jun 15, 2018 by brendan.john

Hi all,


My team is designing a web application development framework, where a web application hosted on a development server would be able to pull data from our production PI Web API. This would allow us to test new applications against live production data.


For this to work, we need CORS to function properly. We followed the information found here:


We wrote a barebones Javascript AJAX call:


We hosted this file on the development server statically. We then accessed a simple webpage on the development server that runs this Javascript file via Chome, and found the following error:



Interestingly, although data is not pulled successfully, Chrome shows a 200 success code:

Our production PI configuration currently looks like:

(I blocked out CorsOrigins, but the development URL from which the calls are coming is in there).


Anyone have ideas on how to correctly configure CORS? Our guesses at the moment are either the configuration is not writing correctly to the server backend, or a Chrome security patch is interfering, in which case this problem would be much more widespread. We've already checked logs the production server's Event Viewer, and haven't noticed anything out of the ordinary. The PI Webapi works perfectly fine when accessed directly.


Thanks in advance!