Is there a way to overwrite the header response in modrequest.class.php? I tried adding a custom response from .htaccess. But it’s actually displaying the responses twice. The one from the htacess and also the one from the PHP file. What’s the correct way to disable the Modx one.
.htaccess:
Header set x-powered-by "Company Name"
modrequest.class.php
// If enabled, send the X-Powered-By header to identify this site as running MODX, per discussion in #12882
if ($this->modx->getOption('send_poweredby_header', null, true)) {
$version = $this->modx->getVersionData();
header("X-Powered-By: MODX {$version['code_name']}");
}
I don’t just want to directly write on the core file if there’s a different way of doing it.
Thanks,
K