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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

What Is Splunk? Here’s What You Can Do with Splunk

Hey Splunk Community, we know you know Splunk. You likely leverage its unparalleled ability to ingest, index, ...

Level Up Your .conf25: Splunk Arcade Comes to Boston

With .conf25 right around the corner in Boston, there’s a lot to look forward to — inspiring keynotes, ...

Manual Instrumentation with Splunk Observability Cloud: How to Instrument Frontend ...

Although it might seem daunting, as we’ve seen in this series, manual instrumentation can be straightforward ...