Getting Data In

Why am I unable to call HEC instance from Splunk Cloud form javascript file? CORS issue

sid_sinha
New Member

Hi, I have trial account with Splunk Cloud, where I am doing POC on sending the API logs to the SPlunk dashobard.

So, fort that I have created HEC token, which is wokring fine with Postman and curl command. 
But when I am actually trying to use that with-in my react app, to send some data by calling the API with post request, I am getting below error, which I can understand becaus eits trying to access different domain and pslunk instance is not accepting request from other domian.

Screen Shot 2023-01-19 at 2.30.00 PM.png

And I am not sure how to fix this, may be is there some setting we can do on instance level to allow traffic from my specific domain ?

 

Can someone please help, 

 

 

Labels (1)
0 Karma
Get Updates on the Splunk Community!

Splunk APM & RUM | Upcoming Planned Maintenance

There will be planned maintenance of Splunk APM’s and Splunk RUM’s streaming infrastructure in the coming ...

Part 2: Diving Deeper With AIOps

Getting the Most Out of Event Correlation and Alert Storm Detection in Splunk IT Service Intelligence   Watch ...

User Groups | Upcoming Events!

If by chance you weren't already aware, the Splunk Community is host to numerous User Groups, organized ...