I am using jupyter notebook to host my machine learning codes and notebooks.

Jupyter Notebook server is sending some HTTP headers like Server = TornadoServer/5.1.1
I want to remove this header. Also want to add some HTTP headers like Cache-Control etc.
Can someone please tell me :

  • What kind of Http server jupyter notebook runs
  • Which configuration file controls the HTTP headers sent by Jupyter notebook
  • Any link which explains how to change/add/remove the HTTP headers

Current jupyter notebook is running on Ubuntu server on https.


1 Answer 1


You can generate a config file in your home directory by running:

jupyter notebook --generate-config

which should leave you with a file ~/.jupyter, called jupyter_notebook_config.py.

Have a look at all the possible configurations in the Jupyter documentation.

In addition to many server options, there is specifically an options to override Tornado configuration.

NotebookApp.tornado_settings : Dict Default: {}

Supply overrides for the tornado.web.Application that the Jupyter notebook uses.

  • $\begingroup$ Thanks found it... I can add new headers.. How to change existing Server header? Should I just give some other value for this header? $\endgroup$ Commented Jun 28, 2019 at 9:51
  • $\begingroup$ I am afraid I do not know. It will depend on what you want to do - if you need more detail I would suggest posting the question on StackOverflow (and include more details about what you actually want to change). $\endgroup$
    – n1k31t4
    Commented Jun 28, 2019 at 9:53
  • $\begingroup$ Hi, The headers set by this method are not present when user is not logged in .. by default notebook opens as /tree? which does not contain these headers $\endgroup$ Commented Jul 2, 2019 at 11:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.