HTTPS not recognized in Symfony API REST

  apache, api, https, security, symfony

I have a Symfony API REST, enabled in my apache production server, which uses HTTPS and certified A+ security by Querys SSL test.

Via a POST route, the API returns a url property, generated with $request->generateUrl method of Symfony Request.
The problem is that the API always generates a http:// url since Symfony does not recognize that the server is using HTTPS (tested with $request->getScheme & $request->getPort).

I have created a new production environnement on my own local, with the same virtual host config: it works !

But I still don’t understand why the production server does not work… Here is my config :

<VirtualHost *:80>
    ServerName api.hooks
    Redirect 308 / https://prod.api.hooks/
<VirtualHost *:443>
    ServerName prod.api.hooks
    SSLEngine on
    SSLCertificateKeyFile "${SRVROOT}/conf/key/private.key"
    SSLCertificateFile "${SRVROOT}/conf/key/certificate.crt"
    Header set Access-Control-Allow-Origin "*"
    Header always set Content-Security-Policy "default-src 'none'!"
    Header always set Referrer-Policy "strict-origin-when-cross-origin"
    Header always set Strict-Transport-Security "max-age=31536000; includeSubdomains;"
    Header always set X-Content-Type-Options "nosniff"
    DocumentRoot C:/wamp64/www/production/hooks/public
    <Directory "C:/wamp64/www/production/hooks/public">
        AllowOverride None
        Require all granted
        FallbackResource /index.php
    <Directory "C:/wamp64/www/production/hooks/public/bundles">
        FallbackResource disabled

Source: Symfony Questions