blob: 7cc5a6561e7108286cf8a35e8bc79d80ebadf128 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
import time
from wptserve.utils import isomorphic_encode
def main(request, response):
headers = [(b'Content-Type', b'application/javascript'),
(b'Cache-Control', b'max-age=86400'),
(b'Last-Modified', isomorphic_encode(time.strftime(u"%a, %d %b %Y %H:%M:%S GMT", time.gmtime())))]
body = u'''
const importTime = {time:8f};
'''.format(time=time.time())
return headers, body
|