admin管理员组文章数量:1130349
I have a site that currently have a some part of the headers like:
Vary: Accept-Encoding, Cookie
I want to modify it to be:
Vary: Accept-Language
I tried the suggestions here using this code
add_action( 'send_headers', 'mod_header_test' );
function mod_header_test() {
header( 'Vary: Accept-Language' );
}
But the results I'm getting is:
Vary: Accept-Encoding, Accept-Language, Cookie
How do I completely erase the existing Vary header using the correct action/filter and replace it with: Vary: Accept-Language ?
I have a site that currently have a some part of the headers like:
Vary: Accept-Encoding, Cookie
I want to modify it to be:
Vary: Accept-Language
I tried the suggestions here using this code
add_action( 'send_headers', 'mod_header_test' );
function mod_header_test() {
header( 'Vary: Accept-Language' );
}
But the results I'm getting is:
Vary: Accept-Encoding, Accept-Language, Cookie
How do I completely erase the existing Vary header using the correct action/filter and replace it with: Vary: Accept-Language ?
本文标签: filtersHow to properly modify WP Vary or any existing headers
版权声明:本文标题:filters - How to properly modify WP Vary or any existing headers? 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749139988a2322003.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论