[~] Refactor
This commit is contained in:
parent
48ce6c87a6
commit
560e748867
@ -43,9 +43,23 @@ def forward(
|
||||
else:
|
||||
server_name = 'default_server'
|
||||
|
||||
if not server_name in sections:
|
||||
if (
|
||||
not server_name in sections
|
||||
):
|
||||
sections[server_name] = []
|
||||
|
||||
if 'client_max_body_size' in entry:
|
||||
client_max_body_size = entry['client_max_body_size']
|
||||
else:
|
||||
client_max_body_size = '50M'
|
||||
|
||||
assert isinstance(client_max_body_size, str)
|
||||
|
||||
sections[server_name].append(
|
||||
r'''
|
||||
client_max_body_size %s;
|
||||
''' % client_max_body_size
|
||||
)
|
||||
|
||||
location_get = lambda location_body, location_path2, prefix=None,: (
|
||||
r'''
|
||||
@ -138,7 +152,7 @@ server {
|
||||
|
||||
server_name {server_name};
|
||||
listen 80 {default_server};
|
||||
client_max_body_size 50M;
|
||||
#client_max_body_size 50M;
|
||||
|
||||
{sections_config}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user