-
Peering Manager version1.7.3 Python version3.9 Steps to ReproduceI have peering manager setup behind an Nginx reverse proxy (on a secondary node) that I use to add TLS. These are the proxy options I have configured in my nginx configuration in case they are relevant:
Essentially all of the site works as expected, except when trying to make any API calls that require pulling the results of a started background job. For example, after configuring a router and adding the correct NAPALM configuration, trying to use either the "Ping" or "Poll Sessions" buttons fails. When accessing the site directly without going through the proxy, these buttons work fine. Expected BehaviorAfter clicking "Ping", it should call this chunk of code in the HTML page generated by the view:
The request to "/api/peering/routers/1/test-napalm-connection/" successfully passes through the reverse proxy and returns. The Javascript Object that gets passed into the Ajax handler "r" has a value "url" that should be set to "/api/extras/job-results/{{ job-id }}/". That url then gets used to monitor the status of the Job to determine if it finished successfully. Observed BehaviorRather than the request to "/api/peering/routers/1/test-napalm-connection/" returning an object with the url "/api/extras/job-results/{{ job-id }}/", it returns with the url "http://100.100.118.85/api/extras/job-results/{{ job-id }}/". Since I'm connecting via reverse proxy, the browser sees "http" and blocks the traffic, plus it fails to connect to the internal IP anyways when specifically allowed. It appears that the Peering Manager API tries to resolve an absolute URL when returning Job Result objects, rather than a relative URL like most of the site is designed around. This might be something I misconfigured, but I don't see anywhere in the database or config where it could be pulling the internal address from, so I am guess Django is resolving that from the interface it is listening on. I tried finding in the code where the url was being generated, but I am not a developer and could use some help for what I imagine is a fairly simple fix if I understand what is happening correctly. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
My config is similar but I don't face this specific issue. Relevant config snippets are:
|
Beta Was this translation helpful? Give feedback.
My config is similar but I don't face this specific issue.
Relevant config snippets are:
/etc/nginx/conf.d/proxy.conf
contains: