integration_mastodon icon indicating copy to clipboard operation
integration_mastodon copied to clipboard

Error 401: "Host violates local access rules" when using a shared subdomain instance

Open csolisr opened this issue 3 years ago • 2 comments

How to replicate:

  • Install Nextcloud and this plugin on https://cloud.example.net
  • Install Mastodon or similar on https://social.example.net
  • Configure this plugin to have your instance point to the latter, then click on "Connect to Mastodon"
  • The attempt will fail with the following error message: Failed to create Mastodon OAuth app: {"error":"Host violates local access rules"}
  • Configure this plugin to have your instance point to any other public server, then click on "Connect to Mastodon"
  • The attempt will be successful and the popup to log in will appear

csolisr avatar Nov 01 '22 14:11 csolisr

Have you tried to set 'allow_local_remote_servers' => true, in your Nextcloud's config.php?

julien-nc avatar Jan 29 '23 14:01 julien-nc

By default, Nextcloud refuses to connect to domains considered as local from the server's perspective.

julien-nc avatar Jan 29 '23 14:01 julien-nc