fix certificate errors on domains with a ccSLD
This commit is contained in:
parent
5498e1de87
commit
984eac6129
6
main.py
6
main.py
@ -184,7 +184,11 @@ class FrontRequestHandler(ProxyRequestHandler):
|
|||||||
f'Proxy-agent: {self.version_string()}\r\n'
|
f'Proxy-agent: {self.version_string()}\r\n'
|
||||||
'\r\n').encode('ascii'))
|
'\r\n').encode('ascii'))
|
||||||
if self.host.count('.') >= 2:
|
if self.host.count('.') >= 2:
|
||||||
commonname = '.' + self.host.partition('.')[-1]
|
isccSLD = len(self.host.split('.')[-2]) <= 3
|
||||||
|
if isccSLD:
|
||||||
|
commonname = self.host
|
||||||
|
else:
|
||||||
|
commonname = '.' + self.host.partition('.')[-1]
|
||||||
else:
|
else:
|
||||||
commonname = self.host
|
commonname = self.host
|
||||||
dummycert = get_cert(commonname, config)
|
dummycert = get_cert(commonname, config)
|
||||||
|
Loading…
Reference in New Issue
Block a user