add cors controls + improve preflight + pw header

This commit is contained in:
ed
2023-01-28 00:59:04 +00:00
parent 0be1e43451
commit 741d781c18
6 changed files with 138 additions and 37 deletions

View File

@@ -109,6 +109,11 @@ class HttpSrv(object):
zs = os.path.join(self.E.mod, "web", "deps", "prism.js.gz")
self.prism = os.path.exists(zs)
self.mallow = "GET HEAD POST PUT DELETE OPTIONS".split()
if not self.args.no_dav:
zs = "PROPFIND PROPPATCH LOCK UNLOCK MKCOL COPY MOVE"
self.mallow += zs.split()
if self.args.zs:
from .ssdp import SSDPr