Restler
Restler copied to clipboard
Hide "X-Powered-By: Luracast Restler" in response headers
For security reasons is it possible to add option to remove this header? This info disclosures internal server structure.
May i sugest if is in production mode hide, else show?
Yes, this header doesn't needed on production servers
2016-01-08 13:39 GMT+02:00 João Pina [email protected]:
May i sugest if is in production mode hide, else show?
— Reply to this email directly or view it on GitHub https://github.com/Luracast/Restler/issues/514#issuecomment-169973748.
Restler::addListener('onRespond', function () {
header('X-Powered-By: google.com');
});
I like to suggest to remove the X-Powered-By header by default.
This makes sense as we never want to divulge too much info. Leaving on in dev can help diagnose versioning issues...
I have also added (and suggest it for others), adding a unique request ID which can be referenced in logs etc...