Referrer policy issue when using Admin API

Ghost URL? DevOps Blog - VegaStack
Ghost-CLI version: 1.17.3
Ghost version: 4.11.0

  • What Node version, database, OS & browser are you using?
    Node version is v14.17.5
    Database is mysql
    OS is Ubuntu 20.04
    Browser is Firefox and Chrome

About the issue -
Unable to use Admin API, because of Referrer policy issue. We have developed an application that basically fetches a blog post, translates the content using Translator API and POSTS the content back to Ghost. It works fine on localhost though.

Error on the browser console is

Tried adding Referrer Policy in config-production.json, that didn’t work.

Unless you’re using session authentication, the Admin API should not be used in a browser. Are you using session or token authentication?

1 Like

We are using Token authentication. Should we be using session auth instead?

Does adding referrer policy in config.production.json help in using admin api with token authentication?

If you’re using the admin API on the client side, you can only use session auth. The key you added in your config file isn’t used by ghost as far as I’m aware