最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Disabling the X-Redirect-By response header

programmeradmin0浏览0评论

Is there a clean way to not have WordPress send the X-Redirect-By response header when redirects happen? I'd like to disable it in order not to expose information about our software stack. Something I can hook into functions.php perhaps?

Is there a clean way to not have WordPress send the X-Redirect-By response header when redirects happen? I'd like to disable it in order not to expose information about our software stack. Something I can hook into functions.php perhaps?

Share Improve this question asked Jun 9, 2020 at 14:41 PieterPieter 1431 gold badge1 silver badge5 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 4

This line added to functions.php (ideally in a child theme, or a plugin) will remove it:

add_filter( 'x_redirect_by', '__return_false' );
发布评论

评论列表(0)

  1. 暂无评论