Skip to content

Commit 907c57a

Browse files
committed
add test servers for sending x-sendfile and x-accel-redirect
1 parent a7bef40 commit 907c57a

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

test/pagespeed_test.conf.template

+25
Original file line numberDiff line numberDiff line change
@@ -1044,6 +1044,31 @@ http {
10441044
pagespeed DisableFilters remove_comments,add_instrumentation;
10451045
}
10461046

1047+
# Test that pagespeed is disabled when sendfile headers are present.
1048+
server {
1049+
listen @@SECONDARY_PORT@@;
1050+
listen [::]:@@SECONDARY_PORT@@;
1051+
server_name uses-sendfile.example.com;
1052+
pagespeed FileCachePath "@@SECONDARY_CACHE@@";
1053+
pagespeed EnableFilters inline_javascript,rewrite_javascript;
1054+
add_header 'X-Sendfile' 'blablabla';
1055+
}
1056+
server {
1057+
listen @@SECONDARY_PORT@@;
1058+
listen [::]:@@SECONDARY_PORT@@;
1059+
server_name doesnt-sendfile.example.com;
1060+
pagespeed FileCachePath "@@SECONDARY_CACHE@@";
1061+
pagespeed EnableFilters inline_javascript,rewrite_javascript;
1062+
}
1063+
server {
1064+
listen @@SECONDARY_PORT@@;
1065+
listen [::]:@@SECONDARY_PORT@@;
1066+
server_name uses-xaccelredirect.example.com;
1067+
pagespeed FileCachePath "@@SECONDARY_CACHE@@";
1068+
pagespeed EnableFilters inline_javascript,rewrite_javascript;
1069+
add_header 'X-Accel-Redirect' 'blablabla';
1070+
}
1071+
10471072
# Proxy + IPRO a gzip'd file for testing Issue 896.
10481073
server {
10491074
listen @@SECONDARY_PORT@@;

0 commit comments

Comments
 (0)