Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

244
Views
How can I access an API without running into Allow Access Control Origin issues?

I've noticed that this seems to be a commonly asked question, but none of the responses I've seen have helped so far. I'm trying to access an API (Cuckoo Sandbox, set up on a VM) from my JavaScript+TypeScript application using an Axios call. This is what the code to call the API looks like.

      axios({
    method: 'get',
    url: 'http://192.168.1.220:1337/tasks/view',
    headers: {          
     'Authorization': 'Bearer WoRKpl5',
    //  'Allow-Control-Allow-Origin': '*'
  },
  }).then(resp =>{
    console.log("Hi")
  }).catch(err => { // then print response status
    console.log(err)
  });

The response is as shown below: Image of response

So far, I've tried editing the api_py file for cuckoo to include headers in the do_post function, modifying the headers in the axios call (commented out), running Chrome browser after disabling web security, trying to disable CORS (unsure if successful) and using a Proxy (CORS-anywhere) hosted on Heroku to add headers, among other things, without much success. Cuckoo Sandbox constantly receives only Options requests. Here is a screenshot of the current headers in the Cuckoo file:

Image of headers

I found it interesting to note that through the regular command line interface and the curl command, the API was working and we could successfully access it. Any further insight on how to successfully hit the API from the application for both GET and POST requests would be helpful.

Thanks

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!