I\'m trying to delete Server
header from django rest framework response, but I didn\'t find an easy way, so I create a middleware to delete it.
This is my f
I just had the exact same problem. Your approach with
del response['Server']
Is correct!
However, you need to move your middleware to be the first. As other middlewares will add headers after the response is constructed, so the order of application is bottom-up. Your middleware has to be the first one to have the "last word".