nginx-config-builder
nginx-config-builder copied to clipboard
`add_route` can accept also `*args`
Current implementation can't handle adding extra block of options by code like example below, due missing passing *args inside add_route.
from nginx.config.helpers import duplicate_options
# (...)
proxy_headers = duplicate_options('proxy_set_header', [
['Upgrade', '$http_upgrade'],
['Host', '$host']
])
server.add_route('/path', proxy_headers, proxy_pass='http://localhost/abc').end()