squeaky-pl / japronto

Screaming-fast Python 3.5+ HTTP toolkit integrated with pipelining HTTP server based on uvloop and picohttpparser.
MIT License
8.61k stars 581 forks source link

No way to change/specify the Server Headers #57

Closed imgurbot12 closed 7 years ago

imgurbot12 commented 7 years ago

The base server headers list:

But I would like to be able to provide:

I mainly want to disguise Japronto as another web-service...

aphillipo commented 7 years ago

Hmmmm....

https://github.com/squeaky-pl/japronto/blob/master/tutorial/5_response.md

  # And of course you can provide custom `headers`.
  def headers(request):
      return request.Response(
          text='headers',
          headers={'X-Header': 'Value',
                   'Refresh': '5; url=https://xkcd.com/353/'})
imgurbot12 commented 7 years ago

@aphillipo Wow. Guess I overlooked that in the examples. I started searching through source code to try and find this. Thanks.