updated readme
This commit is contained in:
parent
69dd863b6c
commit
f1aa34fc56
14
README.md
14
README.md
@ -45,11 +45,8 @@ In `/etc/nginx/dumpdom.conf`, paste this:
|
||||
|
||||
```
|
||||
map $http_user_agent $dumpdom_ua {
|
||||
|
||||
default 0;
|
||||
|
||||
"~Prerender" 0;
|
||||
|
||||
"~*googlebot" 1;
|
||||
"~*bingbot" 1;
|
||||
"~*yandex" 1;
|
||||
@ -133,10 +130,10 @@ server {
|
||||
if ($uri ~* "\.(js|css|xml|less|png|jpg|jpeg|gif|pdf|doc|txt|ico|rss|zip|mp3|rar|exe|wmv|doc|avi|ppt|mpg|mpeg|tif|wav|mov|psd|ai|xls|mp4|m4a|swf|dat|dmg|iso|flv|m4v|torrent|ttf|woff|svg|eot)") {
|
||||
set $dumpdom 0;
|
||||
}
|
||||
if ($prerender = 1) {
|
||||
if ($dumpdom = 1) {
|
||||
proxy_pass http://127.0.0.1:9292;
|
||||
}
|
||||
if ($prerender = 0) {
|
||||
if ($dumpdom = 0) {
|
||||
rewrite .* /index.html break;
|
||||
}
|
||||
}
|
||||
@ -230,16 +227,13 @@ server {
|
||||
if ($args ~ "_escaped_fragment_") {
|
||||
set $dumpdom 1;
|
||||
}
|
||||
if ($http_user_agent ~ "Prerender") {
|
||||
set $dumpdom 0;
|
||||
}
|
||||
if ($uri ~* "\.(js|css|xml|less|png|jpg|jpeg|gif|pdf|doc|txt|ico|rss|zip|mp3|rar|exe|wmv|doc|avi|ppt|mpg|mpeg|tif|wav|mov|psd|ai|xls|mp4|m4a|swf|dat|dmg|iso|flv|m4v|torrent|ttf|woff|svg|eot)") {
|
||||
set $dumpdom 0;
|
||||
}
|
||||
if ($prerender = 1) {
|
||||
if ($dumpdom = 1) {
|
||||
proxy_pass http://127.0.0.1:9292;
|
||||
}
|
||||
if ($prerender = 0) {
|
||||
if ($dumpdom = 0) {
|
||||
rewrite .* /index.html break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user