Jump to content

Recommended Posts

Posted

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.. 

Posted

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
Posted
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
Posted (edited)
7 hours ago, Yashi said:

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

definetly! :)

have posted an issue on github.

PS: welcome to the forums!

Edited by horst
  • Like 3
Posted
11 minutes ago, horst said:

definetly! :)

have posted an issue on github.

PS: welcome to the forums!

Thank you very much... btw PW is awesome CMS. thanks

  • Like 2

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
×
×
  • Create New...