Merge branch 'patch-5' into 'stable-3.1'

Update rest.php to check if remote api is allowed.

See merge request !893
1 job for stable-3.1 in 2 minutes and 35 seconds (queued for 1 second)
Status Job ID Name Coverage
  Syntax
passed #1144
syntax:lint

00:02:35