How to prevent Gunicorn from returning a 'Server' http header?

后端 未结 6 1105
走了就别回头了
走了就别回头了 2021-02-05 06:51

I would like to mask the version or remove the header altogether.

6条回答
  •  青春惊慌失措
    2021-02-05 07:48

    Easiest way -

    For newer releases(20.0.4), create file gunicorn.conf.py with below contents in the directory from where you will run the gunicorn command -

    import gunicorn
    gunicorn.SERVER_SOFTWARE = 'My WebServer'
    

提交回复
热议问题