Is there a way to override the server value in the http header for a websocket?

I’m new to this all and don’t know all the information you need.

I have a web application that is using Panel. I’m trying to override the the server value in the websocket HTTP header to a custom string value. Currently it is returning TornadoServer/6.2. I have tried to add an auth.py to the main folder with the following:

login_url = "#"


def get_user(request_handler):
    request_handler._headers['server'] = 'custom string'
    return 'user'

This only change the server for one item but not all of them.

cc @Philipp_Rudiger

forgot to post an image that may help.

Possibly relevant, but I am not sure how it would be integrated with Panel:

https://docs.bokeh.org/en/latest/docs/user_guide/server/app.html#ug-server-request-handler

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.