Only way of doing this is deleting/commenting the line that’s assigning the server name, for this to happen we’ve to modify the Cowboy source code(it’s an open source code, so we’re allowed to do whatever we wish to do, just kidding )
Take a look at this line https://github.com/ninenines/cowboy/blob/master/src/cowboy_req.erl#L918
Just comment out that line in your deps
folder of your local mix project ie., find/look for the that particular line in My_Project/deps/cowboy/src/cowboy_req.erl
and recompile the mix project i.e., mix deps.compile
. This will remove the server
header.
I wish the author of the Cowboy isn’t that stubborn, I also wish he would listen more to the requirements of the users who are using his software… when I last spoke with him(Loïc Hoguin) over IRC it gave me such a vibe. He is a wonderful and hardworking guy though.
Note: This is just a hack though, when you update your deps, you’ve to redo the process again though, but it’ll achieve what you want to do