我试图将nginx服务器的时间注入HTTP头.
我可以添加到HTTP标头,如下所示:
proxy_set_header HELLO-WORLD 'something';
Run Code Online (Sandbox Code Playgroud)
但是现在,我希望能够将时间注入到HTTP头中,这看起来像这样:
proxy_set_header THE-TIME $time_var;
Run Code Online (Sandbox Code Playgroud)
或类似的东西.
这可能吗?
VBa*_*art 13
您可以使用SSI模块中的变量:$ date_gmt和$ date_local
proxy_set_header THE-TIME $date_gmt;
Run Code Online (Sandbox Code Playgroud)
http://nginx.org/en/docs/http/ngx_http_ssi_module.html#variables
归档时间: |
|
查看次数: |
14175 次 |
最近记录: |