rkey

rkey

Flask removes the Server information from the response headers

Key code:

from flask import Flask, make_response
from werkzeug.serving import WSGIRequestHandler

app = Flask(__name__)

@app.before_request
def set_server_header():
    WSGIRequestHandler.server_version = ''
    WSGIRequestHandler.sys_version = ''

@app.route('/')
def index():
    return 'Hello, World!'

if __name__ == '__main__':
    app.run()

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.