System Information
- Strapi Version: 4.1.3
- Operating System: Linux
- Database: Postgres 10
- Node Version: 14.18.1
- NPM Version: 6.14.16
- Yarn Version: 1.22.17
Hello everyone, I’ve deployed Strapi on AWS ECS using Fargate arc but I got an error Refused to connect to http://localhost:1337/admin/init because it does not appear in the connect-src directive of the Content Security Policy.
when entering http://.com/admin. I’m confused why it calls localhost:1337 even port 80 has been defined in the configuration. Note that when I enter http://.com, it shows the Strapi first page without any errors, and also on my localhost, it’s working perfectly.
Here is my env on AWS ECS
NODE_ENV=PRODUCTION
DATABASE_HOST=xxx.ap-southeast-1.rds.amazonaws.com
DATABASE_PORT=5432
DATABASE_NAME=backend
DATABASE_USERNAME=postgres
DATABASE_PASSWORD=xxx
DATABASE_TIMEZONE=Asia/Bangkok
DATABASE_SCHEMA=public
AWS_ACCESS_KEY_ID=xxx
AWS_ACCESS_SECRET=xxx
AWS_REGION=ap-southeast-1
AWS_BUCKET_NAME=xxx-bucket
API_TOKEN_SALT=xxx
JWT_SECRET=xxx
PORT=80
Thank you in advance.