bepsvpt / secure-headers

PHP Secure Headers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect option header name

opened this issue · comments

It tries to get the value of $this->config['x-power-by'] when it should be $this->config['x-powered-by']

See: https://github.com/bepsvpt/secure-headers/blob/master/src/SecureHeaders.php#L230

PR: #55

Thanks.

This is expected behavior because older version use incorrect key name, you can find it from #50 and b405451.

$this->config['x-powered-by'] ?? ($this->config['x-power-by'] ?? '')

To prevent breaking change, it will use x-powered-by key first. If x-powered-by does not exist, it will use x-power-by.