nginx-config-builder icon indicating copy to clipboard operation
nginx-config-builder copied to clipboard

`add_route` can accept also `*args`

Open mpavlase opened this issue 5 years ago • 0 comments

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()

mpavlase avatar Apr 09 '21 09:04 mpavlase