Native search function fails with 403 error

Hey everyone,

I just upgraded my theme and site to the latest version (5.38.0) and tried to use the native search function, but it didn’t work.

  • How was Ghost installed and configured?

Ghost was installed and updated using the CLI tool

  • What Node version, database, OS & browser are you using?

Node: v14.20.1
OS: Ubuntu 22.04
Latest chrome

  • What errors or information do you see in the console?
403 error

content-api.js:199 Uncaught (in promise) NoPermissionError: Authorization failed
    at content-api.js:199:37
  • What steps could someone else take to reproduce the issue you’re having?

Open Chartbrew blog - Visualizing data in one place click on the main search box and the error appears in the console. Nothing happens when typing something in the search box.

Did anyone encounter this before?

After a long while trying to find the issue, the problem was that I am using Cloudflare workers to make the blog work on a subdirectory. It seems that the API integrations can only be called from the original URL.

I changed my worker’s code to revert the call from my subdirectory to the original subdomain URL where ghost is running from. All good now :+1:

1 Like