Remove 'server' and 'via' headers from heroku? Remove 'server' and 'via' headers from heroku? express express

Remove 'server' and 'via' headers from heroku?


I opened a support ticket in Heroku for that, and they responded it is not possible.

Dan,

Unfortunately, there is no way to remove those headers on a per-application basis.

Cheers, Damien

Here is the conversation:Heroku Ticket


I suspect that Heroku adds those headers after your code runs, so there might not be a lot you can do to remove it. The response is probably on its way out the door as the extra headers are added.

You could experiment and try setting your own values for those two headers, and see if Heroku will be polite enough to not override them. But that's not much help if your goal is to have the headers not be present at all.


I agree with you that there is no way we can remove those response headers, but you can set the value to null if you do not wish to expose them.