Passed
Pull Request — master (#566)
by
unknown
14:29
created

tabpy.tabpy_server.handlers.static_handler   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 90%

Importance

Changes 0
Metric Value
wmc 1
eloc 11
dl 0
loc 16
ccs 9
cts 10
cp 0.9
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A BaseStaticHandler.set_extra_headers() 0 3 1
1 1
import base64
2 1
import binascii
3 1
import concurrent
4 1
import json
5 1
import logging
6 1
import tornado.web
7 1
import uuid
8
9
10
11
12 1
class BaseStaticHandler(tornado.web.StaticFileHandler):
13 1
    def set_extra_headers(self, path):
14
        # set content type to application/json
15
        self.set_header("Strict-Transport-Security", "preload; max-age=2592000")
16
        #self._headers["testheader"] = "test"
17