Access backend API

My netlify app is with domain

I’m trying to access my backend when building the frontend on netlify. I’ve set both the domain and the netlify app url as allowed origins in my backend, however my backend is still not allowing them. When I just use a * for my origins in the backend everything works good

Could you share an example of how you’ve done that?

1 Like

I’m using Strapi for my backend which allows me to make custom middlewares for any route I want. Here’s the middleware I’ve created for the route in question.

The backend is deployed on heroku. The heroku link present is for the strapi admin panel.

I don’t see you sending a CORS header. Are you sending one?

The code above is from the my backend. Should I send a CORS header with my request from the frontend?

Hi @kronk0s ,

From my knowledge CORS is a frontend framework. Try sending it to the frontend