The problem is caused by incorrect HTTP and HTTPS configuration: https://domain.com is the actual site URL, however, http://domain.com is used in Dashboard > Settings > General. In this case, it is necessary to configure URLs correctly, after that, re-save your header.