Jump to content

X-Powerd-By Remain with blank Value


Yashi
 Share

Recommended Posts

Hi, I Just notice, when i disable X-Powered-by header, it remain the header with blank value, why is that, i did couple of test, run with header check tools, and all the tools i test show me X-Powered-By header with blank value, chrome also shows me that way, but firefox remove it if it doesn't have value for it.. 

Link to comment
Share on other sites

How do you disabled it? Please can you try setting it to NULL, and not false?

If this will work, I think it is a glitch here in Line 142 in ProcessPageView.module:

if($config->usePoweredBy !== null) header('X-Powered-By:' . ($config->usePoweredBy ? ' ProcessWire CMS' : ''));

See:  !== null, if you have set it to false, it will result in boolean true, but afterwards, querying simply $config->usePoweredBy results in boolean false, what populates an empty string to the sended header.

  • Like 2
Link to comment
Share on other sites

7 hours ago, horst said:

How do you disabled it? Please can you try setting it to NULL, and not false?

If this will work, I think it is a glitch here in Line 142 in ProcessPageView.module:


if($config->usePoweredBy !== null) header('X-Powered-By:' . ($config->usePoweredBy ? ' ProcessWire CMS' : ''));

See:  !== null, if you have set it to false, it will result in boolean true, but afterwards, querying simply $config->usePoweredBy results in boolean false, what populates an empty string to the sended header.

I think you are right :)  that will did the trick. normally i set it as 

$config->usePoweredBy = false; 

now i change it to null and it all works.

don't you think it has to be fixed ? :) 

 

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...