Final I found the solution.

Replace the Base URL from http://example.com to //example.com

CAUTION! The change is not allowed in magento2 admin.

I made it in MySQL in table cron_config_data and record with path='web/unsecure/base_url'. After cache:clean and varnish restart everything works smoothly.