Skip to content

Conversation

steve-gh
Copy link

No description provided.


OLDEST_SUPPORTED_VERSION = (1, 7, 0)

URLPARTS = re.compile(r'(https?://.*?)(/.*)')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless I'm reading this wrong, it doesn't seem to handle path-based reverse proxies because it only matches to the first /. If the reverse proxy proxies all Ambari API requests under a /ambari path, such as https://proxy.host.com/ambari/api/v1/ -> https://ambari.host.com/api/v1 you'll end up with https://ambari.host.com/ambari/api/v1 instead, which won't be correct.

Also, this doesn't seem to account for QueryableModelCollection. Should we just put this in ambariclient.client.HttpClient.request so we can globally handle it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants