-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot initialize project - An error occurred while requesting the API #18
Comments
It seems wrong that the browser tries to reach out to localhost. So somewhere strapi does not know its own base_href |
Fixed it by setting a host (https://docs.strapi.io/dev-docs/configurations/admin-panel#available-options) in config/admin.js and rebuilding the admin-panel with "yarn build". Restart your container and all should be working. Edit: Best would be setting a env-variable to keep it update-safe |
I have the same Issue, but I dont know what to add to my host env. how can I change the config/admin.js, when I only pulled the docker image ? |
Hi,
when I start the docker container from fresh (doesn't matter if its sqlite or posgres) everything seems to work fine.
But calling the admin console gives a warning:
"An error occurred while rewuesting the API"
and then the loading spinner never terminates .
In the containers log there is no error or warning.
In the browser console I see:
Content Security Policy: The page’s settings blocked the loading of a resource at http:https://localhost:1337/admin/project-type (“connect-src”).
Content Security Policy: The page’s settings blocked the loading of a resource at http:https://localhost:1337/admin/init (“connect-src”).
The text was updated successfully, but these errors were encountered: