Skip to main content Link Menu Expand (external link) Document Search Copy Copied

To append a custom header to the response.headers.

Example:

# ...

@app.route('/hello')
async def hello_world(request, response):
    response.append_header('X-Powered-By', 'foo')

    return 'Hello, World!'

# ...