Api CORS error in localhost

I’m trying to make a request in the builder api content in localhost but I’m receiving CORS error. I’m using NextJs and the project is already setting apiKey.

example query:

const getArticles = async (name: string) => {
try {
const response = await builder.get(‘pible-page-article’, {
query: {
name: { $regex: .*${name}.*, $options: ‘i’ },
},
});

    return response.data.results;
  } catch (error) {
    console.error('Error:', error);
    throw error;
  }
};

I already tried something like this

const getArticles = async (name: string) => {
try {
const response = await builder.get(‘pible-page-article’});

    return response;
  } catch (error) {
    console.error('Error:', error);
    throw error;
  }
};

Hi @Luiz

  • You can try to toggle Proxy Preview, Go to Account setting>Organization>Advanced Settings>Select Advanced Tab> toggle proxy previews on/off.
  • You can also try to install our Chrome Extension to see if that helps.