mirror of
https://github.com/9001/copyparty.git
synced 2026-06-18 20:22:27 -06:00
Remove the self-signed option
Properly configure a reverse proxy/Collabora instead.
This commit is contained in:
parent
55ff1dc501
commit
d4a18e8ac7
|
|
@ -1575,8 +1575,7 @@ def add_opds(ap):
|
|||
def add_wopi(ap):
|
||||
ap2 = ap.add_argument_group("WOPI options")
|
||||
ap2.add_argument("--wopi", action="store_true", help="allows for integrating with office suites using WOPI (volflag=wopi)")
|
||||
ap2.add_argument("--wopi-client", type=u, default="https://localhost:9980", help="where to find your WOPI client, this is what actually hosts e.g. Collabora Online")
|
||||
ap2.add_argument("--wopi-self-signed", action="store_true", help="disable certificate verification of the WOPI client, only use with local use")
|
||||
ap2.add_argument("--wopi-client", type=u, default="https://demo.eu.collaboraonline.com", help="where to find your WOPI client, this is what actually hosts e.g. Collabora Online")
|
||||
|
||||
|
||||
def add_handlers(ap):
|
||||
|
|
|
|||
|
|
@ -397,7 +397,6 @@ flagcats = {
|
|||
"wopi": {
|
||||
"wopi": "enable WOPI support for integrating with online office suites",
|
||||
"wopi-client": "address of WOPI client, e.g. Collabora Online",
|
||||
"wopi-self-signed": "disable certificate verification of the WOPI client, only use with local use"
|
||||
},
|
||||
"opds": {
|
||||
"opds": "enable OPDS",
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ import time
|
|||
import uuid
|
||||
import urllib.request
|
||||
import urllib.parse
|
||||
import ssl
|
||||
import xml.etree.ElementTree as ET
|
||||
from datetime import datetime
|
||||
from operator import itemgetter
|
||||
|
|
@ -1606,10 +1605,7 @@ class HttpCli(object):
|
|||
}
|
||||
|
||||
try:
|
||||
ctx = ssl.create_default_context()
|
||||
ctx.check_hostname = False if self.args.wopi_self_signed else True
|
||||
ctx.verify_mode = ssl.CERT_NONE if self.args.wopi_self_signed else ssl.CERT_REQUIRED
|
||||
discovery = urllib.request.urlopen(self.args.wopi_client + "/hosting/discovery", context=ctx)
|
||||
discovery = urllib.request.urlopen(self.args.wopi_client + "/hosting/discovery")
|
||||
response = ET.fromstring(discovery.read())
|
||||
ext = path.split('.')[-1]
|
||||
wopi_url = response.find(".//action[@ext='%s'][@urlsrc]" % ext).get("urlsrc")
|
||||
|
|
|
|||
Loading…
Reference in a new issue