It’s look like your Allowed Hosts or Path Whitelist not matching the referrer URL in Discourse (in your case docs.gitlab.com and /some/path optional). Can you please double check the setting?
Are you running Discourse with our standard docker installation method?