I was using nginx 1.13.6 with headers_more_module to remove the "Server: nginx" header from all requests. Now, I have recompiled nginx with ngx_pagespeed module using the following command:
bash <(curl -f -L -sS https://ngxpagespeed.com/install) \ --nginx-version latest
The header starts to show up again now. When pagespeed is disabled, the header is not shown anymore. Is there anything that can be done to stop showing the headers when pagespeed is enabled too.