summaryrefslogtreecommitdiffstats
path: root/net/data/websocket/set-hsts_wsh.py
diff options
context:
space:
mode:
Diffstat (limited to 'net/data/websocket/set-hsts_wsh.py')
-rw-r--r--net/data/websocket/set-hsts_wsh.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/net/data/websocket/set-hsts_wsh.py b/net/data/websocket/set-hsts_wsh.py
new file mode 100644
index 0000000..c78a82a
--- /dev/null
+++ b/net/data/websocket/set-hsts_wsh.py
@@ -0,0 +1,19 @@
+# Copyright 2015 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+#
+# Add a Strict-Transport-Security header to the response.
+
+
+import json
+
+
+def web_socket_do_extra_handshake(request):
+ request.extra_headers.append(
+ ('Strict-Transport-Security', 'max-age=3600'))
+ pass
+
+
+def web_socket_transfer_data(request):
+ # Wait for closing handshake
+ request.ws_stream.receive_message()