sanic-org / sanic

Accelerate your web app development | Build fast. Run fast.
https://sanic.dev
MIT License
18k stars 1.54k forks source link

Add server information to the header #2688

Closed ceopeo closed 1 year ago

ceopeo commented 1 year ago

Is there an existing issue for this?

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

ahopkins commented 1 year ago

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__
ceopeo commented 1 year ago

ok thanks mate!!!