Error 405 Method Not Allowed

Nextcloud version: 20
Operating system and version : Synology DSM 6.2.3
HAProxy Docker:latest

My Nextcloud installation runs smoothly behind a HAProxy setup that redirects to https. I can use my nextcloud within the local network with the local IP and outside with a dyndns adress.
However, is recently tried to connect my nextcloud account with an app to synchronize data. In the app (called Docutain, a smartphone scanner app) I received the following error:

OPTIONS /login ERROR 405 Method Not Allowed

In the mentioned app I try to connect to:

https://my-nextcloud-domain.com

I also tried

http://my-nextcloud-domain.com

and even

http://192.168.0.237:8080

Here is my config.php file:

<?PHP
$CONFIG = array (
  'htaccess.RewriteBase' => '/',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 =>
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'instanceid' => '123id123',
  'passwordsalt' => 'xyzpasswordxyz',
  'secret' => 'xyzsecretxyz',
  'trusted_domains' =>
  array (
    0 => 'my-nextcloud-domain.com',
    1 => '192.168.0.237:8080',
    3 => '192.168.0.237:81',
    4 => '172.17.0.1',
  ),

  'overwritehost' => 'my-nextcloud-domain.com',
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'mysql',
  'version' => '20.0.5.2',
  'overwrite.cli.url' => 'http://192.168.0.237:8080',
  'dbname' => 'nextcloud',
  'dbhost' => '192.168.0.237:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'admin',
  'dbpassword' => 'adminpassword',
  'installed' => true,
  'loglevel' => 2,
  'maintenance' => false,
);

How could I solve this issue?