mirror of
https://github.com/xcat2/confluent.git
synced 2026-04-12 20:01:30 +00:00
Tolerate different proxy pass configurations
The stock reverse proxy configuration strips the leading '/confluent-api/' from the URL. However, when doing a custom reverse proxy set up, one may preserve full path without knowing which way to go. Since '/confluent-api/' will never be used inside the api, just strip it when detected to tolerate either of the likely proxy pass behaviors.
This commit is contained in:
@@ -628,6 +628,8 @@ def wsock_handler(ws):
|
||||
|
||||
|
||||
def resourcehandler(env, start_response):
|
||||
if env['PATH_INFO'].startswith('/confluent-api'):
|
||||
env['PATH_INFO'] = env['PATH_INFO'].replace('/confluent-api', '')
|
||||
for hdr in env['headers_raw']:
|
||||
if hdr[0].lower().startswith('confluent'):
|
||||
hdrname = hdr[0].upper()
|
||||
|
||||
Reference in New Issue
Block a user