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

153
Views
How to solve CORS issue in Dunzo developer API while calling from nuxt js using AXIOS?

Getting CORS error while calling Dunzo developer API the API base url is https://apis-staging.dunzo.in

my code is

await axios
    .get("https://apis-staging.dunzo.in/api/v1/token", {
      headers: {
        "client-id": "<MY_CLIENT_ID>",
        "client-secret": "<MY_CLIENT_SECRET>",
        "Accept-Language": "en_US",
        "Content-Type": "application/json",
      },
    })
    .then((response) => {
      return res.status(200).json(response);
    })
    .catch((err) => {
      console.log("err =====", err);
      return res.status(400).json({
        error: err,
      });
    });
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

THANKS TO KISSU I EDIT THIS POST (THIS IS NOT A PROPER SOLUTION)

You can do this to bypass the CORS which is not recommended. Go to nuxt.config.js file and create something like this:

axios: {
  proxy: true
},

proxy: {
  ‍'/api': {
    target: 'http://back-url:<some-port>/',
    pathRewrite: { '^/api': '' }
  }
}

Now, you can send requests like this:

this.$axios.get('/api/some-getter-request')
about 4 years ago · Juan Pablo Isaza Report
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!