How to Enable CSRF bypass in Ghost?

Hey there!

Can anyone point me on how to Enable CSRF bypass in Ghost?

Notes:

  • This is for development environments where I use devtunnels (hence the origin is different from localhost) Request made from incorrect origin. Expected 'http://localhost:2368' received 'https://{random-text-here}.asse.devtunnels.ms
  • I can comment out line 338 (and it solves the issue). But I’d like to know the proper way to do this.

Thank you in advance!
Kasun.

It’s only used for testing:

I’m assuming that if you set your Ghost URL to the devtunnels URL, you won’t get this issue

The problem is, the dev tunnels URLs (generated by VS Code) are random, and when I access the code server from a different client, it generates another URL.

Is there any workaround for this?