向Wordpress添加HTTP头(例如:Vary:User-Agent)

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了向Wordpress添加HTTP头(例如:Vary:User-Agent)相关的知识,希望对你有一定的参考价值。

Add HTTP Header to Wordpress (ex: Vary: User-Agent)
  1. add_action( 'send_headers', 'add_header_vary_useragent' );
  2. function add_header_vary_useragent() {
  3. header( 'Vary: User-Agent' );
  4. }

以上是关于向Wordpress添加HTTP头(例如:Vary:User-Agent)的主要内容,如果未能解决你的问题,请参考以下文章