mirror of
https://github.com/certbot/certbot.git
synced 2026-01-26 07:41:33 +03:00
fix for issue 4132: increasing server_names_hash_bucket_size if necessary (#4496)
* increases server_names_hash_bucket_size if it's too low in your nginx conf * switching from k,v pairwise indices -> inner_line * simply using bucket_directive
This commit is contained in:
@@ -100,9 +100,13 @@ class NginxTlsSni01(common.TLSSNI01):
|
||||
if line[0] == ['http']:
|
||||
body = line[1]
|
||||
found_bucket = False
|
||||
posn = 0
|
||||
for inner_line in body:
|
||||
if inner_line[0] == bucket_directive[1]:
|
||||
if int(inner_line[1]) < int(bucket_directive[3]):
|
||||
body[posn] = bucket_directive
|
||||
found_bucket = True
|
||||
posn += 1
|
||||
if not found_bucket:
|
||||
body.insert(0, bucket_directive)
|
||||
if include_directive not in body:
|
||||
|
||||
Reference in New Issue
Block a user