Relative Content

Tag Archive for strapi

Strapi v5 Cron Task: strapi.db.query().create Not Working as Expected

I created a background task that periodically requests an API service in cron-task in strapi v5.
I made it insert data into the DB to simply test this service, but it doesn’t work well.
I confirmed that the task is called periodically, and there is no error message,
but strapi.db.query().create doesn’t seem to work.

Strapi v5 Cron Task: strapi.db.query().create Not Working as Expected

I created a background task that periodically requests an API service in cron-task in strapi v5.
I made it insert data into the DB to simply test this service, but it doesn’t work well.
I confirmed that the task is called periodically, and there is no error message,
but strapi.db.query().create doesn’t seem to work.

Strapi v5 Cron Task: strapi.db.query().create Not Working as Expected

I created a background task that periodically requests an API service in cron-task in strapi v5.
I made it insert data into the DB to simply test this service, but it doesn’t work well.
I confirmed that the task is called periodically, and there is no error message,
but strapi.db.query().create doesn’t seem to work.

CORS in strapi v4.24.2 doesn’t work anymore

i’m trying to add CORS for some of my sub-domains/domains such that only those will be able to access my strapi resources but unfortunately i’m unable to do so. I followed the documentation as per https://docs.strapi.io/dev-docs/configurations/middlewares, still no luck, I can still access strapi backend through any domain (currently testing with http://localhost:3000/ – my nextjs project (strapi running on http://localhost:1337)). I tried adding @koa/cors and added in resolutions as well but still no luck. Below are some details about the project and some related code ;-