了解nginx prerender.io配置

时间:2016-10-13 20:04:48

标签: nginx prerender

我最近阅读了nginx + prerender.io教程:

https://gist.github.com/thoop/8165802

我一直试图理解它。我知道它通过prerender.io服务,但它认为它应该像

proxy_pass http://$prerender/$scheme://$host$request_uri?;

而不是

if ($prerender = 1) {

    #setting prerender as a variable forces DNS resolution since nginx caches IPs and doesnt play well with load balancing
    set $prerender "service.prerender.io";
    rewrite .* /$scheme://$host$request_uri? break;
    proxy_pass http://$prerender;
}

或许重写句子可以为我做。我只想了解它。感谢。

0 个答案:

没有答案