mirror of https://gitlab.com/bashrc2/epicyon
Try without etag
parent
b74f19ebbf
commit
8b60a53239
12
daemon.py
12
daemon.py
|
@ -715,7 +715,9 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
callingDomain: str, permissive: bool) -> None:
|
callingDomain: str, permissive: bool) -> None:
|
||||||
self.send_response(200)
|
self.send_response(200)
|
||||||
self.send_header('Content-type', fileFormat)
|
self.send_header('Content-type', fileFormat)
|
||||||
if 'image/' in fileFormat or 'video/' in fileFormat:
|
if 'image/' in fileFormat or \
|
||||||
|
'audio/' in fileFormat or \
|
||||||
|
'video/' in fileFormat:
|
||||||
cache_control = \
|
cache_control = \
|
||||||
'public, max-age=84600, must-revalidate, ' + \
|
'public, max-age=84600, must-revalidate, ' + \
|
||||||
'stale-while-revalidate=3600'
|
'stale-while-revalidate=3600'
|
||||||
|
@ -731,7 +733,9 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.send_header('Host', callingDomain)
|
self.send_header('Host', callingDomain)
|
||||||
if permissive:
|
if permissive:
|
||||||
self.send_header('Access-Control-Allow-Origin', '*')
|
self.send_header('Access-Control-Allow-Origin', '*')
|
||||||
if 'image/' in fileFormat or 'video/' in fileFormat:
|
if 'image/' in fileFormat or \
|
||||||
|
'audio/' in fileFormat or \
|
||||||
|
'video/' in fileFormat:
|
||||||
acStr = \
|
acStr = \
|
||||||
'Server, x-goog-meta-frames, Content-Length, ' + \
|
'Server, x-goog-meta-frames, Content-Length, ' + \
|
||||||
'Content-Type, Range, X-Requested-With, ' + \
|
'Content-Type, Range, X-Requested-With, ' + \
|
||||||
|
@ -781,8 +785,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
etagFile.write(etag)
|
etagFile.write(etag)
|
||||||
except BaseException:
|
except BaseException:
|
||||||
pass
|
pass
|
||||||
if etag:
|
# if etag:
|
||||||
self.send_header('ETag', '"' + etag + '"')
|
# self.send_header('ETag', '"' + etag + '"')
|
||||||
if lastModified:
|
if lastModified:
|
||||||
self.send_header('last-modified', lastModified)
|
self.send_header('last-modified', lastModified)
|
||||||
self.end_headers()
|
self.end_headers()
|
||||||
|
|
Loading…
Reference in New Issue