sanic-org / sanic

Accelerate your web app development | Build fast. Run fast.

Home Page:https://sanic.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add server information to the header

ceopeo opened this issue · comments

commented

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe.

I want to be able to find out which version of Sanic is used by the header

Describe the solution you'd like

x-powered-by: Sanic
or
Server: Sanic / 22.2.0

Additional context

No response

I'd suggest adding this yourself. While it is possible of course to use theServer header, we have decided not to advertise that information. If there is ever a security exploit, then it would not be responsible to advertise what version a particular server is using. Therefore, we've decided a while back to not add that directly and instead allow developers the choice.

from sanic import __version__
commented

ok thanks mate!!!