3

I have compiled ngx_pagespeed, but forgot to remove the version number. Is there any way to overwrite/delete/hide them?

Apache has feature to 'unset' them, but I couldn't find anything similar for nginx. Perhaps I do not know how to use headers module?

Or should go to look around in source code and then recompile?

Perhaps anyone could point the exact location then?

Thanks.

Dzh
  • 195
  • 1
  • 7

2 Answers2

2

Pagespeed module has a built-in capability to change this in the configuration. Please use the following in your vhost or nginx.conf or where you defined pagespeed configurations...

pagespeed XHeaderValue "Powered By Dzh - Change this to whatever!";

Ref: https://developers.google.com/speed/pagespeed/module/configuration (under the header "Specifying the value for the PageSpeed header").

Pothi Kalimuthu
  • 5,734
  • 2
  • 24
  • 37
0

You can also put it in separated file contain all needed pagespeed configurations like :

/etc/nginx/conf/conf.d/pagespeed.conf

And that will be included in nginx.conf using:

include "/etc/nginx/conf/conf.d/*.conf";
Thomas
  • 4,155
  • 5
  • 21
  • 28
elbakai
  • 1
  • 1