System Information
- Strapi Version: 4.0.4
- Operating System: GCP App Engine / NodeJS
- Database: Postgres
- Node Version:
- NPM Version:
- Yarn Version:
I’ve spent the last 4 hours trying various ideas I’ve read both here and in the github issues but none have worked so far. I do the local build and then deploy to Google App Engine. The app loads just fine except when I try to load the admin, there are 2 resources that fail to load and prevent the entire app from loading. These errors show up in the console logs for chrome.
Error 1
Refused to connect to ‘http://localhost:1337/admin/project-type’ because it violates the following Content Security Policy directive: “connect-src ‘self’ https:”
Error 2
Refused to connect to ‘http://localhost:1337/admin/init’ because it violates the document’s Content Security Policy
I’ve tried setting:
server → url
server → port
admin → serveAdminPanel
I’ve also set these ENV values and validated that they exist in the deployment:
HOST: ‘0.0.0.0’
NODE_ENV: ‘production’
DATABASE_NAME: ‘xxxxx’
DATABASE_USERNAME: ‘xxxxx’
DATABASE_PASSWORD: ‘xxxxx’
INSTANCE_CONNECTION_NAME: ‘xxxxx’
JWT_SECRET: ‘xxxxx’
API_TOKEN_SALT: ‘xxxxx’
PUBLIC_URL: ‘xxxxx’
STRAPI_ADMIN_BACKEND_URL: ‘xxxx/admin’
** had to remove the “https” from the url in this topic due to not being able to put more than 2 links in the issue.
I’ve also made sure to build after making changes and before deploying.