我的Meteor应用程序的站点配置具有以下类似的指令:
server {
listen 443;
server_name XXX;
ssl on;
ssl_certificate XXX;
ssl_certificate_key XXX;
location / {
proxy_pass http://localhost:3000;
proxy_set_header X-Real-IP $remote_addr; # http://wiki.nginx.org/HttpProxyModule
proxy_http_version 1.1; # recommended for keep-alive connections per http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_http_version
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
}
}
我觉得我应该告诉nginx来提供static_cacheable
的内容并设置expires
头为max
。我应该怎么做?这里还有其他需要添加的东西吗?
css
/js
文件,当您在client
目录中更改 Meteor 文件时,用户的副本是否仍将更新(例如热代码重新加载)? - Nyxynyxexpires
头文件,以使其在开发模式下正常工作,但这应该是可能的。 - David Weldon