Pdf preview (not thumbnail) stopped working (probably due to double encoding)

Hello,
on our server the pdf preview (not the thumbnails) stopped working.
The error is “Missing pdf”. The problem seem related to URL double encoding, the URL of the file is:
Missing PDF “https://smartshare.archidata.it/remote.php/dav/files/XX/FA_109991615117%20f.pdf

The file name has a space and that should be encoded with a %20 while I get a %2520.

Anyone has an y clue where this double encoding comes from ?

Nextcloud version (eg, 20.0.5): 20.0.10
Operating system and version : Ubuntu 20.04 LTS Server
Apache or nginx version : Apache 2.4.41
PHP version : 7.4.3
Plain install (not docker) behind HA proxy as SSl offloader.

This is the first time we experience this issue.

We have no errors in nextcloud logs .

This is our config file:

$CONFIG = array (
  'trusted_proxies' =>
  array (
    0 => 'XXXXXXXX',
  ),
  'overwritehost' => 'smartshare.archidata.it',
  'overwriteprotocol' => 'https',
  'instanceid' => 'XXXXXXX',
  'passwordsalt' => 'XXXXXXXXXXXX',
  'secret' => 'XXXXXXXXXXXX',
  'trusted_domains' =>
  array (
    0 => 'smartshare.archidata.it',
  ),
  'datadirectory' => 'XXXXXXXXXX',
  'dbtype' => 'mysql',
  'version' => '20.0.10.1',
  'overwrite.cli.url' => 'https://smartshare.archidata.it',
  'dbname' => 'xxxxxxxxxx',
  'dbhost' => 'XXXXXXXXXX',
  'dbport' => '',
  'dbtableprefix' => 'XXXXXXX',
  'mysql.utf8mb4' => true,
  'dbuser' => 'XXXXXXXXXXXX',
  'dbpassword' => 'XXXXXXXXXXXXX',
  'installed' => true,
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'tls',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'XXXXXXXXXXXX',
  'mail_domain' => 'archidata.it',
  'mail_smtpauth' => 1,
  'mail_smtpauthtype' => 'PLAIN',
  'mail_smtphost' => 'XXXXXXXXXXX',
  'mail_smtpport' => 'XXXXXXX',
  'mail_smtpname' => 'XXXXXXXXXXX',
  'mail_smtppassword' => 'XXXXXXXXXXXXXX',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'trashbin_retention_obligation' => 'auto',
  'updater.release.channel' => 'stable',

I think the problem is related to this already reported issue: