Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider suport for custom Server header #315

Open
2-5 opened this issue Jun 6, 2024 · 0 comments
Open

Consider suport for custom Server header #315

2-5 opened this issue Jun 6, 2024 · 0 comments
Labels
enhancement New feature or request polar

Comments

@2-5
Copy link
Contributor

2-5 commented Jun 6, 2024

Right now Granian returns a hard-coded Server: granian header. Consider allowing it's customization, mainly to make it (a bit) harder to profile and attack.

If the app returns a Server header, you end up with two of them:

proto.response_str(
    status=200,
    headers=[
        ("content-type", "text/plain"),
        ("server", "MyServer"),
    ],
    body=f"Hello, world!",
)
HTTP/1.1 200 OK
server: granian
server: MyServer
content-type: text/plain
content-length: 18
date: Thu, 06 Jun 2024 10:48:46 GMT

Funding

  • You can sponsor this specific effort via a Polar.sh pledge below
  • We receive the pledge once the issue is completed & verified
Fund with Polar
@gi0baro gi0baro added the enhancement New feature or request label Jun 7, 2024
@gi0baro gi0baro added the polar label Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request polar
Projects
None yet
Development

No branches or pull requests

2 participants