netbox in subfolder: api search is not working for tags #3019
Labels
status: accepted
This issue has been accepted for implementation
type: bug
A confirmed report of unexpected behavior in the application
Environment
If you install netbox as usual, but configure a subfolder like
https://mydomain.org/netbox
to access your installation, then you have to set the BASE_PATH in configuration.py and nearly everything works like a charm.Unfortunately working with tags is difficult, because the Ajax results could not be loaded if you try to search or modify tags with help of the ui.
The reason is that within the static javascript, the var
netbox_api_path
is not used. Instead, the api url is hardcoded: https://github.com/digitalocean/netbox/blob/develop/netbox/project-static/js/forms.js#L253The solution is easy: just use the variable, i.e
url: netbox_api_path + 'extras/tags/',
instead ofurl: "/api/extras/tags/",
A quick workaround without adapting the code is to rewrite the incoming requests. For Apache this config will do the job:
I will write a small patch to avoid the "rewrite" workaround.
The text was updated successfully, but these errors were encountered: