Hello
I'm using pagespeed 1.12.34.3-stable with nginx-1.13.7.
I've found that some headers (like STS) are not present in my site when using nginx. Here is an example:
HTTP/2 200
server: nginx
content-type: text/html; charset=UTF-8
vary: Accept-Encoding
pragma: public
date: Mon, 18 Dec 2017 19:36:57 GMT
x-page-speed: Powered By ngx_pagespeed
cache-control: max-age=0, no-cache
HTTP/2 200
server: nginx
date: Mon, 18 Dec 2017 19:37:22 GMT
content-type: text/html; charset=UTF-8
vary: Accept-Encoding
x-tec-api-version: v1
strict-transport-security: max-age=31536000
x-content-type-options: nosniff
As you can see I have some headers that are not delivered with pagespeed. One of the missing headers is strict-transport-security and it's important for me to deliver this header with my pages.
Do you have any suggestion on how to instruct pagespeed to maintain this header?
This is my actual configuration:
Global:
pagespeed MessageBufferSize 10240;
pagespeed FileCachePath "/var/cache/nginx/pagespeed/";
pagespeed Statistics on;
pagespeed UsePerVhostStatistics on;
pagespeed StatisticsLogging on;
pagespeed LogDir /var/log/pagespeed;
pagespeed AdminPath /pagespeed_admin;
pagespeed EnableCachePurge on;
pagespeed ForceCaching on;
Virtual Host:
pagespeed on;
pagespeed RewriteLevel CoreFilters;
pagespeed FileCachePath "/var/cache/nginx/mysite-pagespeed/";
pagespeed FileCacheSizeKb 2048000;
pagespeed FileCacheInodeLimit 500000;
pagespeed LoadFromFile "https://www.mysite.net/wp-content/" "/var/www/mysite.net/wp-content/"; pagespeed ImplicitCacheTtlMs 864000000;
include vhosts/pagespeed.include;
pagespeed InPlaceResourceOptimization on;
pagespeed EnableFilters extend_cache;
pagespeed EnableFilters insert_dns_prefetch;
pagespeed EnableFilters canonicalize_javascript_libraries;
pagespeed EnableFilters remove_comments;
# Ensure requests for pagespeed optimized resources go to the pagespeed handler and no extraneous headers get set.
location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" {
add_header "" "";
}
location ~ "^/pagespeed_static/" { }
location ~ "^/ngx_pagespeed_beacon$" { }
Thanks for your help
Regards
Fabio