Admin not working on GCP App Engine

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: ‘’
NODE_ENV: ‘production’
JWT_SECRET: ‘xxxxx’
PUBLIC_URL: ‘xxxxx’

** 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.

Any suggestions? No matter what I’ve done, it keeps trying to make a connection to localhost:1337

1 Like

Hi, did you find the answer? stuck at the same place with Azure VM.
Thanks :slight_smile:

Not yet. Moving on to something else.

Hi Donald,

dou you have find out a solution for this issue?

No, ended up hosting with Digital Ocean instead.

Hi Donald,
I’m having the same issue deploying i a droplet. How didi you solved?