Getting a 403 error popup when trying to admin users

I’ve just installed discourse on a new server. Things are going great but now I am getting a popup for 403 error whenever I try to do perform admin tasks:

  • editing user / granting moderator status

The errors in the console log are:


PUT https://discuss.royaleapi.com/admin/users/5/grant_moderation 403

SyntaxError: Unexpected token < in JSON at position 0
    at Function.parse [as parseJSON] (<anonymous>)

Uncaught {jqXHR: {…}, textStatus: "error", errorThrown: "", _discourse_displayed: true}

Also, I am unable to log out for some reason. I have cleared my browser cache and login fresh but still clicking on the logout link does nothing.

For the log out issue I see this in my console:

includes.js?v=xxxxxxxxxx DELETE https://discuss.royaleapi.com/session/sml 403

ember_jquery-xxxxxxx.js:1 Uncaught {jqXHR: {…}, textStatus: "error", errorThrown: ""}

I’ve replaced some of the paths above because I was not sure they are keys or not

Update: I’ve solved this issue by setting Cloudflare to DNS only mode.

However, is there anyway to proxy over Cloudflare / any settings that would work? I guess I should follow these settings… https://www.communiteq.com/kb/using-cloudflare/

2 Likes

That document is specifically for clients hosting with us, not a general recommendation for self hosted instances.

As a rule of thumb I would say: stick to DNS only (grey cloud) unless you really know what you are doing.

1 Like

tenor

2 Likes

Noted — we do have to use Cloudflare for our other subdomains :sweat_smile: