Request made from incorrect origin. Expected 'http://localhost:2368' received 'https://blogs.mpaq.org'

This is driving me insaine and is probly something simple:

And

  • How was Ghost installed and configured? from ghost-cli
  • What Node version, database, OS & browser are you using? Debian 12,MariaDB 10.11.14, FireFox
  • What errors or information do you see in the console? When connecting to /ghost/
  • What steps could someone else take to reproduce the issue you’re having?

My config file is:
{
“url”: “http://localhost:2368”,
“server”: {
“port”: 2368,
“host”: “localhost”
},
“database”: {
“client”: “mysql”,
“connection”: {
“host”: “xxx.xxx.xxx.xxx”,
“user”: “xxx”,
“password”: “xxx”,
“database”: “xxx”
}
},
“mail”: {
“from”: “‘MPAQ’ admin@mpaq.org”,
“transport”: “Direct”
},
“logging”: {
“transports”: [
“file”,
“stdout”
]
},
“process”: “systemd”,

“security”: {
“staffDeviceVerification”: true
},
“paths”: {
“contentPath”: “/var/www/ghost/content”
}
}
NGINX:
server {
listen xxx.xxx.xxx.xxx:xx;
server_name blogs.mpaq.org;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:2368;
}
client_max_body_size 50m;
}

Please tell me I’m just getting old and blind :slight_smile:

I have tried https://blogs.mpaq.org, http://blogs.mpaq.org and a lot of other things but this thing is still giving the same error with the different URLs. PLEASE help

Try setting the URL in your config file to https://blogs.mpaq.org

(post deleted by author)

Thank you so much for responding. I think I tried that to but got the same problem. I’ll try it again.

be sure to restart ghost afterwards :)

Yep and this is what comes up now, I thought I’d tried that too…

The page isn’t redirecting properly

I set the URL in config to https://blogs.mpaq.org and it stopped working for users, set to http://blogs.mpaq.org comes up for the users.

Could it have something to do with nginx config???

That normally occurs when you’re missing the x-forwarded-proto header in your ngind config. Note that you will want to fix this since setting the url as http will lead to weird (or maybe not weird as well) errors in the future

Ok, and the above NGINX hasn’t changed so???:
server {
listen xxx.xxx.xxx.xxx:xx;
server_name blogs.mpaq.org;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:2368;
}
client_max_body_size 50m;
}