set-hsts_wsh.py 484 B

12345678910111213141516171819
  1. # Copyright 2015 The Chromium Authors. All rights reserved.
  2. # Use of this source code is governed by a BSD-style license that can be
  3. # found in the LICENSE file.
  4. #
  5. # Add a Strict-Transport-Security header to the response.
  6. import json
  7. def web_socket_do_extra_handshake(request):
  8. request.extra_headers.append(
  9. ('Strict-Transport-Security', 'max-age=3600'))
  10. pass
  11. def web_socket_transfer_data(request):
  12. # Wait for closing handshake
  13. request.ws_stream.receive_message()